From 4bdb58a8ca8a00f3a86eb06536899d5f2bad4d06 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Wed, 14 Dec 2022 00:33:02 +0100 Subject: [PATCH] examples: fixing building errors on macOS Reference to the 'count' was ambiguous (var name / std::count). --- src/examples/MultiCanvas.cpp | 12 ++++++------ src/examples/Svg.cpp | 6 +++--- src/examples/Tvg.cpp | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/examples/MultiCanvas.cpp b/src/examples/MultiCanvas.cpp index 4625b37e..6dd8b7cf 100644 --- a/src/examples/MultiCanvas.cpp +++ b/src/examples/MultiCanvas.cpp @@ -36,7 +36,7 @@ using namespace std; #define NUM_PER_LINE 5 #define SIZE (WIDTH/NUM_PER_LINE) -static size_t count = 0; +static size_t counter = 0; static std::vector> canvases; @@ -61,7 +61,7 @@ void tvgDrawCmds(tvg::Canvas* canvas, const char* path, const char* name) cout << "SVG: " << buf << endl; - count++; + counter++; } @@ -103,10 +103,10 @@ void tvgSwTest(const char* name, const char* path, void* data) evas_object_image_pixels_dirty_set(view, EINA_TRUE); evas_object_image_data_update_add(view, 0, 0, SIZE, SIZE); evas_object_image_alpha_set(view, EINA_TRUE); - evas_object_image_pixels_get_callback_set(view, drawSwView, reinterpret_cast(count)); + evas_object_image_pixels_get_callback_set(view, drawSwView, reinterpret_cast(counter)); evas_object_event_callback_add(view, EVAS_CALLBACK_DEL, sw_del, buffer); evas_object_resize(view, SIZE, SIZE); - evas_object_move(view, (count % NUM_PER_LINE) * SIZE, SIZE * (count / NUM_PER_LINE)); + evas_object_move(view, (counter % NUM_PER_LINE) * SIZE, SIZE * (counter / NUM_PER_LINE)); evas_object_show(view); //Create a Canvas @@ -139,7 +139,7 @@ void gl_del(void* data, Evas* evas, Eo* obj, void* ev) void initGLview(Evas_Object *obj) { auto objData = reinterpret_cast(evas_object_data_get(obj, "objdata")); - objData->idx = count; + objData->idx = counter; static constexpr auto BPP = 4; @@ -189,7 +189,7 @@ void tvgGlTest(const char* name, const char* path, void* data) evas_object_data_set(view, "objdata", reinterpret_cast(objData)); evas_object_event_callback_add(view, EVAS_CALLBACK_DEL, gl_del, objData); evas_object_resize(view, SIZE, SIZE); - evas_object_move(view, (count % NUM_PER_LINE) * SIZE, SIZE * (count / NUM_PER_LINE)); + evas_object_move(view, (counter % NUM_PER_LINE) * SIZE, SIZE * (counter / NUM_PER_LINE)); evas_object_show(view); } diff --git a/src/examples/Svg.cpp b/src/examples/Svg.cpp index a22ef36b..e5041978 100644 --- a/src/examples/Svg.cpp +++ b/src/examples/Svg.cpp @@ -31,7 +31,7 @@ #define NUM_PER_COL 6 #define SIZE (WIDTH/NUM_PER_ROW) -static int count = 0; +static int counter = 0; static std::vector> pictures; @@ -63,13 +63,13 @@ void svgDirCallback(const char* name, const char* path, void* data) } picture->scale(scale); - picture->translate((count % NUM_PER_ROW) * SIZE + shiftX, (count / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL) + shiftY); + picture->translate((counter % NUM_PER_ROW) * SIZE + shiftX, (counter / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL) + shiftY); pictures.push_back(move(picture)); cout << "SVG: " << buf << endl; - count++; + counter++; } void tvgDrawCmds(tvg::Canvas* canvas) diff --git a/src/examples/Tvg.cpp b/src/examples/Tvg.cpp index 5512f43d..bf36259a 100644 --- a/src/examples/Tvg.cpp +++ b/src/examples/Tvg.cpp @@ -31,7 +31,7 @@ #define NUM_PER_COL 6 #define SIZE (WIDTH/NUM_PER_ROW) -static int count = 0; +static int counter = 0; static std::vector> pictures; @@ -49,13 +49,13 @@ void tvgDirCallback(const char* name, const char* path, void* data) if (picture->load(buf) != tvg::Result::Success) return; picture->size(SIZE, SIZE); - picture->translate((count % NUM_PER_ROW) * SIZE, (count / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL)); + picture->translate((counter % NUM_PER_ROW) * SIZE, (counter / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL)); pictures.push_back(move(picture)); cout << "TVG: " << buf << endl; - count++; + counter++; } void tvgDrawCmds(tvg::Canvas* canvas)