mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
15
Brutal.ImGui/Manual/ImAssert.cs
Normal file
15
Brutal.ImGui/Manual/ImAssert.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace Brutal.ImGuiApi;
|
||||
|
||||
public class ImException(string message) : Exception(message);
|
||||
|
||||
public partial class ImGui
|
||||
{
|
||||
/// <summary>
|
||||
/// This is an equivalent of the IM_ASSERT C++ macro, intended for similar validation in ported code.
|
||||
/// </summary>
|
||||
public static void Assert(bool condition, string? message = null)
|
||||
{
|
||||
if (!condition)
|
||||
throw new ImException(message ?? "Assertion failed");
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue