Skip to content

Commit

Permalink
fix ldc compilation under ldc 0.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Dilly committed Apr 9, 2015
1 parent 268e79d commit 39eac92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions source/derelict/imgui/funcs.d
Expand Up @@ -38,8 +38,6 @@ private
import std.c.stdarg:va_list;
}

ImVec2 foo;

extern(C) @nogc nothrow
{
alias da_ig_GetIO = ImGuiIO* function();
Expand Down Expand Up @@ -264,7 +262,10 @@ extern(C) @nogc nothrow
alias da_ig_SetMouseCursor = void function(ImGuiMouseCursor type);
alias da_ig_GetTime = float function();
alias da_ig_GetFrameCount = int function();
alias da_ig_GetStyleColName = const char* function(ImGuiCol idx);
version(LDC)

This comment has been minimized.

Copy link
@extrawurst

extrawurst Apr 9, 2015

Owner

this is to workaround ldc-developers/ldc#893

alias da_ig_GetStyleColName = const char* function(int idx);//to make ldc0.15.1 happy, otherwise ImGuiCol is correct
else
alias da_ig_GetStyleColName = const char* function(ImGuiCol idx);
alias da_ig_CalcItemRectClosestPoint = void function(ImVec2* pOut, const ImVec2 pos, bool on_edge = false, float outward = +0.0f);
alias da_ig_CalcTextSize = void function(ImVec2* pOut, const char* text, const char* text_end = null, bool hide_text_after_double_hash = false, float wrap_width = -1.0f);
alias da_ig_CalcListClipping = void function(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
Expand Down
3 changes: 1 addition & 2 deletions source/derelict/imgui/imgui.d
Expand Up @@ -62,9 +62,8 @@ private
static assert(0, "Need to implement imgui libNames for this operating system.");
}

class DerelictImguiLoader : SharedLibLoader
final class DerelictImguiLoader : SharedLibLoader
{

protected
{
override void loadSymbols()
Expand Down

0 comments on commit 39eac92

Please sign in to comment.