1
0

Enable C++17 in build

This commit is contained in:
Peter Bell
2020-05-09 16:51:54 +01:00
committed by peterbell10
parent e6634ed26c
commit 1123c95cf2
11 changed files with 41 additions and 35 deletions

View File

@@ -18,7 +18,7 @@
cCraftingGrid::cCraftingGrid(int a_Width, int a_Height) :
m_Width(a_Width),
m_Height(a_Height),
m_Items(new cItem[a_Width * a_Height])
m_Items(new cItem[ToUnsigned(a_Width * a_Height)])
{
}
@@ -27,9 +27,7 @@ cCraftingGrid::cCraftingGrid(int a_Width, int a_Height) :
cCraftingGrid::cCraftingGrid(const cItem * a_Items, int a_Width, int a_Height) :
m_Width(a_Width),
m_Height(a_Height),
m_Items(new cItem[a_Width * a_Height])
cCraftingGrid(a_Width, a_Height)
{
for (int i = a_Width * a_Height - 1; i >= 0; i--)
{
@@ -42,9 +40,7 @@ cCraftingGrid::cCraftingGrid(const cItem * a_Items, int a_Width, int a_Height) :
cCraftingGrid::cCraftingGrid(const cCraftingGrid & a_Original) :
m_Width(a_Original.m_Width),
m_Height(a_Original.m_Height),
m_Items(new cItem[a_Original.m_Width * a_Original.m_Height])
cCraftingGrid(a_Original.m_Width, a_Original.m_Height)
{
for (int i = m_Width * m_Height - 1; i >= 0; i--)
{