examples: fixing building errors on macOS

Reference to the 'count' was ambiguous (var name / std::count).
This commit is contained in:
Mira Grudzinska 2022-12-14 00:33:02 +01:00 committed by Hermet Park
parent 3732b2c54a
commit 4bdb58a8ca
3 changed files with 12 additions and 12 deletions

View file

@ -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<unique_ptr<tvg::Canvas>> 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<void*>(count));
evas_object_image_pixels_get_callback_set(view, drawSwView, reinterpret_cast<void*>(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<ObjData*>(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<void*>(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);
}

View file

@ -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<unique_ptr<tvg::Picture>> 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)

View file

@ -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<unique_ptr<tvg::Picture>> 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)