diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-05-29 11:08:32 +0200 |
commit | 1e6f02437e88495d57249f742526526ee5865777 (patch) | |
tree | af200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/WorldStorage/EnchantmentSerializer.cpp | |
parent | Merge pull request #2157 from beeduck/Issue2106 (diff) | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-1e6f02437e88495d57249f742526526ee5865777.tar cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2 cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst cuberite-1e6f02437e88495d57249f742526526ee5865777.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/EnchantmentSerializer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WorldStorage/EnchantmentSerializer.cpp b/src/WorldStorage/EnchantmentSerializer.cpp index a6e562956..b28e16b1d 100644 --- a/src/WorldStorage/EnchantmentSerializer.cpp +++ b/src/WorldStorage/EnchantmentSerializer.cpp @@ -14,8 +14,8 @@ void EnchantmentSerializer::WriteToNBTCompound(const cEnchantments & a_Enchantme for (cEnchantments::cMap::const_iterator itr = a_Enchantments.m_Enchantments.begin(), end = a_Enchantments.m_Enchantments.end(); itr != end; ++itr) { a_Writer.BeginCompound(""); - a_Writer.AddShort("id", itr->first); - a_Writer.AddShort("lvl", itr->second); + a_Writer.AddShort("id", static_cast<Int16>(itr->first)); + a_Writer.AddShort("lvl", static_cast<Int16>(itr->second)); a_Writer.EndCompound(); } // for itr - m_Enchantments[] a_Writer.EndList(); @@ -82,7 +82,7 @@ void EnchantmentSerializer::ParseFromNBT(cEnchantments & a_Enchantments, const c } // Store the enchantment: - a_Enchantments.m_Enchantments[id] = lvl; + a_Enchantments.m_Enchantments[id] = static_cast<unsigned int>(lvl); } // for tag - children of the ench list tag } |