Fixed some 64-bit related compiler warnings on VS.
This commit is contained in:
parent
5e5d86bc6d
commit
8a1d0bae34
@ -213,7 +213,7 @@ protected:
|
|||||||
|
|
||||||
int *intPtr=0;
|
int *intPtr=0;
|
||||||
short *shtPtr=0;
|
short *shtPtr=0;
|
||||||
#ifdef __MINGW64__
|
#if defined(__MINGW64__) || defined(_WIN64)
|
||||||
char *cp = 0;int dataLen =0;intptr_t nr=0;
|
char *cp = 0;int dataLen =0;intptr_t nr=0;
|
||||||
#else
|
#else
|
||||||
char *cp = 0;int dataLen =0;long nr=0;
|
char *cp = 0;int dataLen =0;long nr=0;
|
||||||
@ -251,7 +251,7 @@ protected:
|
|||||||
cp++;
|
cp++;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
#ifdef __MINGW64__
|
#if defined(__MINGW64__) || defined(_WIN64)
|
||||||
nr= (intptr_t)cp;
|
nr= (intptr_t)cp;
|
||||||
#else
|
#else
|
||||||
nr= (long)cp;
|
nr= (long)cp;
|
||||||
@ -290,7 +290,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
#ifdef __MINGW64__
|
#if defined(__MINGW64__) || defined(_WIN64)
|
||||||
nr= (intptr_t)cp;
|
nr= (intptr_t)cp;
|
||||||
#else
|
#else
|
||||||
nr= (long)cp;
|
nr= (long)cp;
|
||||||
|
@ -317,7 +317,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (m_hue_settings.empty())
|
if (m_hue_settings.empty())
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
const unsigned int hue = m_random_hue.get(m_hue_settings.size());
|
const unsigned int hue = m_random_hue.get((int)m_hue_settings.size());
|
||||||
assert(hue < m_hue_settings.size());
|
assert(hue < m_hue_settings.size());
|
||||||
return m_hue_settings[hue];
|
return m_hue_settings[hue];
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool isStatic() const { return m_dynamic_hue.empty(); }
|
bool isStatic() const { return m_dynamic_hue.empty(); }
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
unsigned int getNumberOfHue() const { return m_dynamic_hue.size(); }
|
unsigned int getNumberOfHue() const
|
||||||
|
{
|
||||||
|
return (unsigned int)m_dynamic_hue.size();
|
||||||
|
} // getNumberOfHue
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
float getDynamicHue(unsigned int hue) const
|
float getDynamicHue(unsigned int hue) const
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,10 @@ namespace GUIEngine
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
/** Returns the number of screens on the stack. Is used to decide
|
/** Returns the number of screens on the stack. Is used to decide
|
||||||
* if exiting a screen would cause STK to end or not. */
|
* if exiting a screen would cause STK to end or not. */
|
||||||
unsigned int getMenuStackSize() const { return m_menu_stack.size(); }
|
unsigned int getMenuStackSize() const
|
||||||
|
{
|
||||||
|
return (unsigned int)m_menu_stack.size();
|
||||||
|
}
|
||||||
}; // Class AbstractStateManager
|
}; // Class AbstractStateManager
|
||||||
|
|
||||||
} // GUIEngine
|
} // GUIEngine
|
||||||
|
@ -171,7 +171,7 @@ public:
|
|||||||
* difference to size() happens if the string to be sent was previously
|
* difference to size() happens if the string to be sent was previously
|
||||||
* read, and has m_current_offset != 0. Even in this case the whole
|
* read, and has m_current_offset != 0. Even in this case the whole
|
||||||
* string must be sent. */
|
* string must be sent. */
|
||||||
unsigned int getTotalSize() const { return m_buffer.size(); }
|
unsigned int getTotalSize() const { return (unsigned int)m_buffer.size(); }
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
// All functions related to adding data to a network string
|
// All functions related to adding data to a network string
|
||||||
/** Add 8 bit unsigned int. */
|
/** Add 8 bit unsigned int. */
|
||||||
|
@ -161,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
TYPE * pointer = m_contents_vector[n];
|
TYPE * pointer = m_contents_vector[n];
|
||||||
delete pointer;
|
delete pointer;
|
||||||
m_contents_vector[n] = (TYPE*)0xDEADBEEF;
|
m_contents_vector[n] = (TYPE*)(intptr_t)0xDEADBEEF;
|
||||||
|
|
||||||
// When deleting, it's important that the same pointer cannot be
|
// When deleting, it's important that the same pointer cannot be
|
||||||
// twice in the vector, resulting in a double delete
|
// twice in the vector, resulting in a double delete
|
||||||
|
Loading…
x
Reference in New Issue
Block a user