mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix MSVC compiler warnings (#10197)
This commit is contained in:
parent
47948793c1
commit
3c2890692b
@ -48,7 +48,7 @@ struct FontSpec {
|
|||||||
|
|
||||||
u16 getHash()
|
u16 getHash()
|
||||||
{
|
{
|
||||||
return (mode << 2) | (bold << 1) | italic;
|
return (mode << 2) | (static_cast<u8>(bold) << 1) | static_cast<u8>(italic);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
|
@ -545,7 +545,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
|
|||||||
if (prompt.getCursorLength() <= 0)
|
if (prompt.getCursorLength() <= 0)
|
||||||
return true;
|
return true;
|
||||||
std::wstring wselected = prompt.getSelection();
|
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());
|
Environment->getOSOperator()->copyToClipboard(selected.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -575,7 +575,7 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
|
|||||||
if (prompt.getCursorLength() <= 0)
|
if (prompt.getCursorLength() <= 0)
|
||||||
return true;
|
return true;
|
||||||
std::wstring wselected = prompt.getSelection();
|
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());
|
Environment->getOSOperator()->copyToClipboard(selected.c_str());
|
||||||
prompt.cursorOperation(
|
prompt.cursorOperation(
|
||||||
ChatPrompt::CURSOROP_DELETE,
|
ChatPrompt::CURSOROP_DELETE,
|
||||||
|
Loading…
Reference in New Issue
Block a user