aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoradrido <robots_only_adrido@gmx.com>2020-08-23 15:41:04 +0200
committerGitHub <noreply@github.com>2020-08-23 15:41:04 +0200
commit3c2890692bb4c292023a8260cf9ce70f82b2e780 (patch)
treeeae073fc93ccf87a990ed3b85764ef9c93dea098 /src
parent47948793c16fc293c1d6b4ccee05421bc0864360 (diff)
downloadminetest-3c2890692bb4c292023a8260cf9ce70f82b2e780.tar.gz
minetest-3c2890692bb4c292023a8260cf9ce70f82b2e780.tar.bz2
minetest-3c2890692bb4c292023a8260cf9ce70f82b2e780.zip
Fix MSVC compiler warnings (#10197)
Diffstat (limited to 'src')
-rw-r--r--src/client/fontengine.h2
-rw-r--r--src/gui/guiChatConsole.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/fontengine.h b/src/client/fontengine.h
index 865b2d3ff..c6efa0df4 100644
--- a/src/client/fontengine.h
+++ b/src/client/fontengine.h
@@ -48,7 +48,7 @@ struct FontSpec {
u16 getHash()
{
- return (mode << 2) | (bold << 1) | italic;
+ return (mode << 2) | (static_cast<u8>(bold) << 1) | static_cast<u8>(italic);
}
unsigned int size;
diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp
index 8de00c12f..575c6ab25 100644
--- a/src/gui/guiChatConsole.cpp
+++ b/src/gui/guiChatConsole.cpp
@@ -545,7 +545,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
if (prompt.getCursorLength() <= 0)
return true;
std::wstring wselected = prompt.getSelection();
- std::string selected(wselected.begin(), wselected.end());
+ std::string selected = wide_to_utf8(wselected);
Environment->getOSOperator()->copyToClipboard(selected.c_str());
return true;
}
@@ -575,7 +575,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
if (prompt.getCursorLength() <= 0)
return true;
std::wstring wselected = prompt.getSelection();
- std::string selected(wselected.begin(), wselected.end());
+ std::string selected = wide_to_utf8(wselected);
Environment->getOSOperator()->copyToClipboard(selected.c_str());
prompt.cursorOperation(
ChatPrompt::CURSOROP_DELETE,