Skip to content

Commit de04b98

Browse files
committed
Properly converting console colors; Warning fix
1 parent 3f886f2 commit de04b98

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/Colors/TColor.inl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ namespace Langulus::Math
3535
alpha = 255;
3636
}
3737

38+
reinterpret_cast<unsigned&>(from) &=
39+
~(static_cast<unsigned>(Logger::NextColor)
40+
| static_cast<unsigned>(Logger::PreviousColor)
41+
);
42+
3843
switch (from) {
3944
case Logger::DarkBlue:
4045
case Logger::DarkBlueBgr:
@@ -166,6 +171,9 @@ namespace Langulus::Math
166171
else
167172
red = green = blue = 0;
168173
break;
174+
default:
175+
// Not reachable, but avoid warnings
176+
break;
169177
}
170178
}
171179

0 commit comments

Comments
 (0)