summaryrefslogtreecommitdiff
path: root/src/net/buysellhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-26 22:22:22 +0100
committerIra Rice <irarice@gmail.com>2009-03-05 17:22:19 -0700
commit448d9076137fc5dde666a90820992a34a945cbf7 (patch)
treeee8d478fbced980a0ea868e9a7810ca56c49fe97 /src/net/buysellhandler.cpp
parenta79d05b01d4a2dc639e6d3a5b7ddd508e64d3511 (diff)
downloadmana-448d9076137fc5dde666a90820992a34a945cbf7.tar.gz
mana-448d9076137fc5dde666a90820992a34a945cbf7.tar.bz2
mana-448d9076137fc5dde666a90820992a34a945cbf7.tar.xz
mana-448d9076137fc5dde666a90820992a34a945cbf7.zip
Got rid of Sint{8,16,32} and Uint32 for being ID
Using unsigned rarely makes sense, especially when the server doesn't use it either. Other uses of unsigned should be reviewed. In all other cases, int is the fastest integer type on any architecture. Using 8 or 16 bits can basically only be a memory optimization.
Diffstat (limited to 'src/net/buysellhandler.cpp')
-rw-r--r--src/net/buysellhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp
index e9255540..5b8f0b68 100644
--- a/src/net/buysellhandler.cpp
+++ b/src/net/buysellhandler.cpp
@@ -78,10 +78,10 @@ void BuySellHandler::handleMessage(MessageIn *msg)
for (int k = 0; k < n_items; k++)
{
- Sint32 value = msg->readInt32();
+ int value = msg->readInt32();
msg->readInt32(); // DCvalue
msg->readInt8(); // type
- Sint16 itemId = msg->readInt16();
+ int itemId = msg->readInt16();
buyDialog->addItem(itemId, value);
}
break;
@@ -97,8 +97,8 @@ void BuySellHandler::handleMessage(MessageIn *msg)
for (int k = 0; k < n_items; k++)
{
- Sint16 index = msg->readInt16();
- Sint32 value = msg->readInt32();
+ int index = msg->readInt16();
+ int value = msg->readInt32();
msg->readInt32(); // OCvalue
Item *item = player_node->getInventory()->getItem(index);