mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 20:02:17 +00:00
fixes compiler warnings (#9619)
* compiler warnings: adds SYSTEM to [target_]include_directories to skip warnings originating from dependencies * compiler warnings: uninitialized/unused variables, missing parenthesis, pragma * compiler warnings: redundant template type, missing curly braces, pass 0 instead of NULL as int argument * compiler warnings: removes fclose(fp) where fp==nullptr since fclose() has attribute __nonnull((1)) * compiler warnings: uninitialized variables, missing parentheses, missing curly braces * compiler warnings: ? as lower precedence than << * compiler warnings: unused variable * compiler warnings: unused result * compiler warnings: undefined/unused variable * compiler warnings: uninitialized variable
This commit is contained in:
committed by
GitHub
parent
9569841091
commit
3ecca6116d
@@ -257,7 +257,7 @@ ColorRGBA complementary(const ColorRGBA& color)
|
||||
|
||||
ColorRGB saturate(const ColorRGB& color, float factor)
|
||||
{
|
||||
float h, s, v;
|
||||
float h = 0.0, s = 0.0, v = 0.0;
|
||||
RGBtoHSV(color.r(), color.g(), color.b(), h, s, v);
|
||||
s = std::clamp(s * factor, 0.0f, 1.0f);
|
||||
float r, g, b;
|
||||
@@ -272,7 +272,7 @@ ColorRGBA saturate(const ColorRGBA& color, float factor)
|
||||
|
||||
ColorRGB opposite(const ColorRGB& color)
|
||||
{
|
||||
float h, s, v;
|
||||
float h = 0.0, s = 0.0, v = 0.0;
|
||||
RGBtoHSV(color.r(), color.g(), color.b(), h, s, v);
|
||||
|
||||
h += 65.0f; // 65 instead 60 to avoid circle values
|
||||
|
||||
Reference in New Issue
Block a user