Skip to content

Commit

Permalink
Fixed compiler warnings on Mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 17, 2023
1 parent 9561114 commit 80ffad4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/Testbed/TestbedContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,12 +1023,12 @@ static int GetColorDiff(std::uint8_t a, std::uint8_t b)

static ColorRGBub GetHeatMapColor(int diff, int scale = 1)
{
constexpr std::uint8_t heapMapLUT[256][3] =
constexpr std::uint8_t heapMapLUT[256*3] =
{
#include "HeatMapLUT.inl"
};
diff = std::max(0, std::min(diff * scale, 255));
return ColorRGBub{ heapMapLUT[diff][0], heapMapLUT[diff][1], heapMapLUT[diff][2] };
return ColorRGBub{ heapMapLUT[diff*3], heapMapLUT[diff*3+1], heapMapLUT[diff*3+2] };
}

int TestbedContext::DiffImagesTGA(const std::string& name, int threshold, int scale)
Expand Down
8 changes: 0 additions & 8 deletions wrapper/C99/C99Canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ static void ConvertCanvasDesc(CanvasDescriptor& dst, const LLGLCanvasDescriptor&
dst.borderless = src.borderless;
}

static void ConvertCanvasDesc(LLGLCanvasDescriptor& dst, const CanvasDescriptor& src)
{
static thread_local std::string internalTitle;
internalTitle = src.title.c_str();
dst.title = internalTitle.c_str();
dst.borderless = src.borderless;
}

LLGL_C_EXPORT LLGLCanvas llglCreateCanvas(const LLGLCanvasDescriptor* canvasDesc)
{
LLGL_ASSERT_PTR(canvasDesc);
Expand Down

0 comments on commit 80ffad4

Please sign in to comment.