Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/StarFont.cpp2
-rw-r--r--source/core/StarImageProcessing.cpp4
-rw-r--r--source/core/StarLuaConverters.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/core/StarFont.cpp b/source/core/StarFont.cpp
index 8113cf9..82151e3 100644
--- a/source/core/StarFont.cpp
+++ b/source/core/StarFont.cpp
@@ -115,7 +115,7 @@ std::pair<Image, Vec2I> Font::render(String::Char c) {
for (unsigned y = 0; y != height; ++y) {
uint8_t* p = slot->bitmap.buffer + y * slot->bitmap.pitch;
for (unsigned x = 0; x != width; ++x) {
- if (x >= 0 && y >= 0 && x < width && y < height) {
+ if (x < width && y < height) {
uint8_t value = *(p + x);
if (m_alphaThreshold) {
if (value >= m_alphaThreshold) {
diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp
index a98e7e5..f3a3108 100644
--- a/source/core/StarImageProcessing.cpp
+++ b/source/core/StarImageProcessing.cpp
@@ -182,7 +182,7 @@ ImageOperation imageOperationFromString(StringView string) {
c[0] |= (c[0] << 4);
c[1] |= (c[1] << 4);
c[2] |= (c[2] << 4);
- c[3] = 255;
+ c[3] = static_cast<char>(255);
}
else if (hexLen == 4) {
nibbleDecode(hexPtr, 4, c, 4);
@@ -193,7 +193,7 @@ ImageOperation imageOperationFromString(StringView string) {
}
else if (hexLen == 6) {
hexDecode(hexPtr, 6, c, 4);
- c[3] = 255;
+ c[3] = static_cast<char>(255);
}
else if (hexLen == 8) {
hexDecode(hexPtr, 8, c, 4);
diff --git a/source/core/StarLuaConverters.cpp b/source/core/StarLuaConverters.cpp
index e170da5..d361af7 100644
--- a/source/core/StarLuaConverters.cpp
+++ b/source/core/StarLuaConverters.cpp
@@ -47,7 +47,7 @@ LuaValue LuaConverter<LuaCallbacks>::from(LuaEngine& engine, LuaCallbacks const&
return table;
}
-Maybe<LuaCallbacks> LuaConverter<LuaCallbacks>::to(LuaEngine& engine, LuaValue const& v) {
+Maybe<LuaCallbacks> LuaConverter<LuaCallbacks>::to(LuaEngine&, LuaValue const&) {
return {};
}