Fixed more 64-bit related compiler warnings.
This commit is contained in:
parent
c6109c9392
commit
efec344738
@ -49,7 +49,7 @@ Event::Event(ENetEvent* event)
|
|||||||
if (m_type == EVENT_TYPE_MESSAGE)
|
if (m_type == EVENT_TYPE_MESSAGE)
|
||||||
{
|
{
|
||||||
m_data = new NetworkString(event->packet->data,
|
m_data = new NetworkString(event->packet->data,
|
||||||
event->packet->dataLength);
|
(int)event->packet->dataLength);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_data = NULL;
|
m_data = NULL;
|
||||||
|
@ -75,7 +75,7 @@ void NetworkString::unitTesting()
|
|||||||
* the characters of the given string. */
|
* the characters of the given string. */
|
||||||
BareNetworkString& BareNetworkString::encodeString(const std::string &value)
|
BareNetworkString& BareNetworkString::encodeString(const std::string &value)
|
||||||
{
|
{
|
||||||
int len = value.size();
|
int len = (int)value.size();
|
||||||
if(len<=255)
|
if(len<=255)
|
||||||
return this->addUInt8(len).addString(value);
|
return this->addUInt8(len).addString(value);
|
||||||
else
|
else
|
||||||
|
@ -55,7 +55,7 @@ Protocol::~Protocol()
|
|||||||
*/
|
*/
|
||||||
NetworkString* Protocol::getNetworkString(size_t capacity)
|
NetworkString* Protocol::getNetworkString(size_t capacity)
|
||||||
{
|
{
|
||||||
return new NetworkString(m_type, capacity);
|
return new NetworkString(m_type, (int)capacity);
|
||||||
} // getNetworkString
|
} // getNetworkString
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -128,7 +128,7 @@ void LatencyProtocol::asynchronousUpdate()
|
|||||||
{
|
{
|
||||||
NetworkString *ping_request =
|
NetworkString *ping_request =
|
||||||
getNetworkString(5);
|
getNetworkString(5);
|
||||||
ping_request->addUInt8(1).addUInt32(m_pings[i].size());
|
ping_request->addUInt8(1).addUInt32((int)m_pings[i].size());
|
||||||
m_pings[i] [ m_pings_count ] = current_time;
|
m_pings[i] [ m_pings_count ] = current_time;
|
||||||
peers[i]->sendPacket(ping_request, false);
|
peers[i]->sendPacket(ping_request, false);
|
||||||
delete ping_request;
|
delete ping_request;
|
||||||
|
@ -618,7 +618,7 @@ void STKHost::handleDirectSocketRequest()
|
|||||||
// current players, and the client's ip address and port
|
// current players, and the client's ip address and port
|
||||||
// number (which solves the problem which network interface
|
// number (which solves the problem which network interface
|
||||||
// might be the right one if there is more than one).
|
// might be the right one if there is more than one).
|
||||||
BareNetworkString s(name.size()+1+11);
|
BareNetworkString s((int)name.size()+1+11);
|
||||||
s.encodeString(name);
|
s.encodeString(name);
|
||||||
s.addUInt8(NetworkConfig::get()->getMaxPlayers());
|
s.addUInt8(NetworkConfig::get()->getMaxPlayers());
|
||||||
s.addUInt8(0); // FIXME: current number of connected players
|
s.addUInt8(0); // FIXME: current number of connected players
|
||||||
|
@ -162,7 +162,7 @@ void MultitouchSettingsDialog::updateValues()
|
|||||||
|
|
||||||
CheckBoxWidget* buttons_en = getWidget<CheckBoxWidget>("buttons_enabled");
|
CheckBoxWidget* buttons_en = getWidget<CheckBoxWidget>("buttons_enabled");
|
||||||
assert(buttons_en != NULL);
|
assert(buttons_en != NULL);
|
||||||
buttons_en->setState(UserConfigParams::m_multitouch_mode);
|
buttons_en->setState(UserConfigParams::m_multitouch_mode!=0);
|
||||||
|
|
||||||
CheckBoxWidget* accelerometer;
|
CheckBoxWidget* accelerometer;
|
||||||
accelerometer = getWidget<CheckBoxWidget>("accelerometer_disabled");
|
accelerometer = getWidget<CheckBoxWidget>("accelerometer_disabled");
|
||||||
|
@ -149,11 +149,11 @@ void ArenaGraph::loadNavmesh(const std::string &navmesh)
|
|||||||
|
|
||||||
createQuad(all_vertices[quad_index[0]],
|
createQuad(all_vertices[quad_index[0]],
|
||||||
all_vertices[quad_index[1]], all_vertices[quad_index[2]],
|
all_vertices[quad_index[1]], all_vertices[quad_index[2]],
|
||||||
all_vertices[quad_index[3]], m_all_nodes.size(),
|
all_vertices[quad_index[3]], (int)m_all_nodes.size(),
|
||||||
false/*invisible*/, false/*ai_ignore*/, true/*is_arena*/,
|
false/*invisible*/, false/*ai_ignore*/, true/*is_arena*/,
|
||||||
false/*ignore*/);
|
false/*ignore*/);
|
||||||
|
|
||||||
ArenaNode* cur_node = getNode(m_all_nodes.size() - 1);
|
ArenaNode* cur_node = getNode((int)m_all_nodes.size() - 1);
|
||||||
cur_node->setAdjacentNodes(adjacent_quad_index);
|
cur_node->setAdjacentNodes(adjacent_quad_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ void ArenaGraph::setNearbyNodesOfAllNodes()
|
|||||||
{
|
{
|
||||||
std::vector<float>::iterator it =
|
std::vector<float>::iterator it =
|
||||||
std::min_element(dist.begin(), dist.end());
|
std::min_element(dist.begin(), dist.end());
|
||||||
const int pos = it - dist.begin();
|
const int pos = int(it - dist.begin());
|
||||||
nearby_nodes.push_back(pos);
|
nearby_nodes.push_back(pos);
|
||||||
dist[pos] = 999999.0f;
|
dist[pos] = 999999.0f;
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,7 @@ bool Translations::isRTLText(const wchar_t *in_ptr)
|
|||||||
FriBidiChar *fribidiInput = toFribidiChar(in_ptr);
|
FriBidiChar *fribidiInput = toFribidiChar(in_ptr);
|
||||||
|
|
||||||
FriBidiCharType *types = new FriBidiCharType[length];
|
FriBidiCharType *types = new FriBidiCharType[length];
|
||||||
fribidi_get_bidi_types(fribidiInput, length, types);
|
fribidi_get_bidi_types(fribidiInput, (FriBidiStrIndex)length, types);
|
||||||
freeFribidiChar(fribidiInput);
|
freeFribidiChar(fribidiInput);
|
||||||
|
|
||||||
// Declare as RTL if one character is RTL
|
// Declare as RTL if one character is RTL
|
||||||
@ -608,7 +608,7 @@ core::stringw Translations::fribidizeLine(const core::stringw &str)
|
|||||||
FriBidiChar *fribidiOutput = new FriBidiChar[length + 1];
|
FriBidiChar *fribidiOutput = new FriBidiChar[length + 1];
|
||||||
memset(fribidiOutput, 0, (length + 1) * sizeof(FriBidiChar));
|
memset(fribidiOutput, 0, (length + 1) * sizeof(FriBidiChar));
|
||||||
fribidi_boolean result = fribidi_log2vis(fribidiInput,
|
fribidi_boolean result = fribidi_log2vis(fribidiInput,
|
||||||
length,
|
(FriBidiStrIndex)length,
|
||||||
&pbase_dir,
|
&pbase_dir,
|
||||||
fribidiOutput,
|
fribidiOutput,
|
||||||
/* gint *position_L_to_V_list */ NULL,
|
/* gint *position_L_to_V_list */ NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user