From 744e00c904ebde6c89aa4763f06118635694d396 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 27 Apr 2014 13:43:59 -0700 Subject: Worked around const pointer --- src/BlockArea.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index 49c564ca5..e4b122fa2 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -665,9 +665,10 @@ void cBlockArea::Merge(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_R { size_t SrcCount = a_Src.GetBlockCount(); size_t DestCount = GetBlockCount(); - SrcMetas = new NIBBLETYPE[SrcCount]; + NIBBLETYPE * tempSrcMetas = new NIBBLETYPE[SrcCount]; + memset(tempSrcMetas, 0, SrcCount); + SrcMetas = tempSrcMetas; DstMetas = new NIBBLETYPE[DestCount]; - memset(SrcMetas, 0, SrcCount); memset(DstMetas, 0, DestCount); } -- cgit v1.2.3