From 307230259e10cec1f3bf98374fdb9327d16ebcc6 Mon Sep 17 00:00:00 2001 From: badlogic Date: Thu, 7 Jun 2018 13:12:22 +0200 Subject: [PATCH] [cpp] Fixed asserts in Atlas.cpp. --- spine-cpp/spine-cpp/src/spine/Atlas.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/Atlas.cpp b/spine-cpp/spine-cpp/src/spine/Atlas.cpp index cbf5c9ef3..15484e0dd 100644 --- a/spine-cpp/spine-cpp/src/spine/Atlas.cpp +++ b/spine-cpp/spine-cpp/src/spine/Atlas.cpp @@ -134,15 +134,15 @@ void Atlas::load(const char *begin, int length, const char *dir) { /* size is only optional for an atlas packed with an old TexturePacker. */ page->width = toInt(tuple); page->height = toInt(tuple + 1); - assert(readTuple(&begin, end, tuple)); + readTuple(&begin, end, tuple); page->format = (Format) indexOf(formatNames, 8, tuple); - assert(readTuple(&begin, end, tuple)); + readTuple(&begin, end, tuple); page->minFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple); page->magFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple + 1); - assert(readValue(&begin, end, &str)); + readValue(&begin, end, &str); page->uWrap = TextureWrap_ClampToEdge; page->vWrap = TextureWrap_ClampToEdge; @@ -170,14 +170,14 @@ void Atlas::load(const char *begin, int length, const char *dir) { region->page = page; region->name = String(mallocString(&str), true); - assert(readValue(&begin, end, &str)); + readValue(&begin, end, &str); region->rotate = equals(&str, "true") ? true : false; - assert(readTuple(&begin, end, tuple) == 2); + readTuple(&begin, end, tuple); region->x = toInt(tuple); region->y = toInt(tuple + 1); - assert(readTuple(&begin, end, tuple) == 2); + readTuple(&begin, end, tuple); region->width = toInt(tuple); region->height = toInt(tuple + 1); @@ -213,7 +213,7 @@ void Atlas::load(const char *begin, int length, const char *dir) { region->pads[2] = toInt(tuple + 2); region->pads[3] = toInt(tuple + 3); - assert(readTuple(&begin, end, tuple)); + readTuple(&begin, end, tuple); } } @@ -224,7 +224,7 @@ void Atlas::load(const char *begin, int length, const char *dir) { region->offsetX = (float)toInt(tuple); region->offsetY = (float)toInt(tuple + 1); - assert(readValue(&begin, end, &str)); + readValue(&begin, end, &str); region->index = toInt(&str);