summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.h8
-rw-r--r--src/app/system_windows.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/app/app.h b/src/app/app.h
index 1275d10..8848be1 100644
--- a/src/app/app.h
+++ b/src/app/app.h
@@ -129,11 +129,11 @@ enum InputSlot
struct InputBinding
{
//! Key
- int key;
+ unsigned int key;
//! Key modifier (e.g. shift, control)
- int kmod;
+ unsigned int kmod;
//! Joystick button
- int joy;
+ unsigned int joy;
inline InputBinding()
{
@@ -142,7 +142,7 @@ struct InputBinding
inline void Reset()
{
- key = kmod = joy = -1;
+ key = kmod = joy = static_cast<unsigned int>(-1);
}
};
diff --git a/src/app/system_windows.h b/src/app/system_windows.h
index 72d9f88..c9743e6 100644
--- a/src/app/system_windows.h
+++ b/src/app/system_windows.h
@@ -48,18 +48,18 @@ struct SystemTimeStamp
// Convert a wide Unicode string to an UTF8 string
std::string UTF8_Encode_Windows(const std::wstring &wstr)
{
- int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL);
+ int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], static_cast<int>(wstr.size()), NULL, 0, NULL, NULL);
std::string strTo(size_needed, 0);
- WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL);
+ WideCharToMultiByte(CP_UTF8, 0, &wstr[0], static_cast<int>(wstr.size()), &strTo[0], size_needed, NULL, NULL);
return strTo;
}
// Convert an UTF8 string to a wide Unicode String
std::wstring UTF8_Decode_Windows(const std::string &str)
{
- int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0);
+ int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], static_cast<int>(str.size()), NULL, 0);
std::wstring wstrTo(size_needed, 0);
- MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), &wstrTo[0], size_needed);
+ MultiByteToWideChar(CP_UTF8, 0, &str[0], static_cast<int>(str.size()), &wstrTo[0], size_needed);
return wstrTo;
}