Skip to content

Commit

Permalink
Fix MSVC compiler warnings (#10197)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrido committed Aug 23, 2020
1 parent 4794879 commit 3c28906
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/fontengine.h
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/guiChatConsole.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3c28906

Please sign in to comment.