summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/inventory.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadManaVerse-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
ManaVerse-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
ManaVerse-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
ManaVerse-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 9aff286ff..8569dc8fb 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -49,9 +49,9 @@ Inventory::Inventory(int type, int size):
mSize(size == -1 ? static_cast<unsigned>(
Net::getInventoryHandler()->getSize(type))
: static_cast<unsigned>(size)),
+ mItems(new Item*[mSize]),
mUsed(0)
{
- mItems = new Item*[mSize];
std::fill_n(mItems, mSize, static_cast<Item*>(nullptr));
}