mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fixed warnings.
This commit is contained in:
41
3rdparty/ocornut-imgui/imgui_node_graph_test.cpp
vendored
41
3rdparty/ocornut-imgui/imgui_node_graph_test.cpp
vendored
@@ -12,6 +12,27 @@
|
||||
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); }
|
||||
static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x-rhs.x, lhs.y-rhs.y); }
|
||||
|
||||
struct Node
|
||||
{
|
||||
int ID;
|
||||
char Name[32];
|
||||
ImVec2 Pos, Size;
|
||||
float Value;
|
||||
int InputsCount, OutputsCount;
|
||||
|
||||
Node(int id, const char* name, const ImVec2& pos, float value, int inputs_count, int outputs_count) { ID = id; strncpy(Name, name, 31); Name[31] = 0; Pos = pos; Value = value; InputsCount = inputs_count; OutputsCount = outputs_count; }
|
||||
|
||||
ImVec2 GetInputSlotPos(int slot_no) const { return ImVec2(Pos.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)InputsCount+1)); }
|
||||
ImVec2 GetOutputSlotPos(int slot_no) const { return ImVec2(Pos.x + Size.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)OutputsCount+1)); }
|
||||
};
|
||||
|
||||
struct NodeLink
|
||||
{
|
||||
int InputIdx, InputSlot, OutputIdx, OutputSlot;
|
||||
|
||||
NodeLink(int input_idx, int input_slot, int output_idx, int output_slot) { InputIdx = input_idx; InputSlot = input_slot; OutputIdx = output_idx; OutputSlot = output_slot; }
|
||||
};
|
||||
|
||||
// Really dumb data structure provided for the example.
|
||||
// Note that we storing links are INDICES (not ID) to make example code shorter, obviously a bad idea for any general purpose code.
|
||||
void ShowExampleAppCustomNodeGraph(bool* opened)
|
||||
@@ -23,26 +44,6 @@ void ShowExampleAppCustomNodeGraph(bool* opened)
|
||||
return;
|
||||
}
|
||||
|
||||
struct Node
|
||||
{
|
||||
int ID;
|
||||
char Name[32];
|
||||
ImVec2 Pos, Size;
|
||||
float Value;
|
||||
int InputsCount, OutputsCount;
|
||||
|
||||
Node(int id, const char* name, const ImVec2& pos, float value, int inputs_count, int outputs_count) { ID = id; strncpy(Name, name, 31); Name[31] = 0; Pos = pos; Value = value; InputsCount = inputs_count; OutputsCount = outputs_count; }
|
||||
|
||||
ImVec2 GetInputSlotPos(int slot_no) const { return ImVec2(Pos.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)InputsCount+1)); }
|
||||
ImVec2 GetOutputSlotPos(int slot_no) const { return ImVec2(Pos.x + Size.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)OutputsCount+1)); }
|
||||
};
|
||||
struct NodeLink
|
||||
{
|
||||
int InputIdx, InputSlot, OutputIdx, OutputSlot;
|
||||
|
||||
NodeLink(int input_idx, int input_slot, int output_idx, int output_slot) { InputIdx = input_idx; InputSlot = input_slot; OutputIdx = output_idx; OutputSlot = output_slot; }
|
||||
};
|
||||
|
||||
static ImVector<Node> nodes;
|
||||
static ImVector<NodeLink> links;
|
||||
static bool inited = false;
|
||||
|
||||
2
3rdparty/stb/stb_truetype.h
vendored
2
3rdparty/stb/stb_truetype.h
vendored
@@ -2048,7 +2048,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
|
||||
static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata)
|
||||
{
|
||||
(void)vsubsample;
|
||||
stbtt__hheap hh = { 0 };
|
||||
stbtt__hheap hh = {};
|
||||
stbtt__active_edge *active = NULL;
|
||||
int y,j=0, i;
|
||||
float scanline_data[129], *scanline, *scanline2;
|
||||
|
||||
Reference in New Issue
Block a user