From 71d127220b2469cc49e61b528e2c5c5548097b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 17 Apr 2015 17:55:24 +0200 Subject: rename Mode::Static => Mode::Still --- bin/render.cpp | 2 +- include/mbgl/map/map.hpp | 2 +- src/mbgl/map/map.cpp | 8 ++++---- test/api/repeated_render.cpp | 2 +- test/api/set_style.cpp | 2 +- test/headless/headless.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/render.cpp b/bin/render.cpp index 78cb5b59f5..cd7a54f48d 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) { HeadlessView view; Map map(view, fileSource); - map.start(Map::Mode::Static); + map.start(Map::Mode::Still); // Set access token if present if (token.size()) { diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 992c12b83e..f9738debe9 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -51,7 +51,7 @@ public: enum class Mode : uint8_t { None, // we're not doing any processing Continuous, // continually updating map - Static, // a once-off static image. + Still, // a once-off still image. }; explicit Map(View&, FileSource&); diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 5e7473820e..e931d09e0d 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -247,15 +247,15 @@ void Map::resume() { void Map::renderStill(StillImageCallback fn) { assert(Environment::currentlyOn(ThreadType::Main)); - if (mode != Mode::Static) { - throw util::Exception("Map is not in static render mode"); + if (mode != Mode::Still) { + throw util::Exception("Map is not in still image render mode"); } if (callback) { throw util::Exception("Map is currently rendering an image"); } - assert(mode == Mode::Static); + assert(mode == Mode::Still); callback = std::move(fn); @@ -287,7 +287,7 @@ void Map::run() { uv_run(env->loop, UV_RUN_DEFAULT); checkForPause(); } - } else if (mode == Mode::Static) { + } else if (mode == Mode::Still) { terminating = false; while (!terminating) { uv_run(env->loop, UV_RUN_DEFAULT); diff --git a/test/api/repeated_render.cpp b/test/api/repeated_render.cpp index 16688ec36f..25a5d5d28f 100644 --- a/test/api/repeated_render.cpp +++ b/test/api/repeated_render.cpp @@ -24,7 +24,7 @@ TEST(API, RepeatedRender) { Map map(view, fileSource); - map.start(Map::Mode::Static); + map.start(Map::Mode::Still); { view.resize(128, 512, 1); diff --git a/test/api/set_style.cpp b/test/api/set_style.cpp index 973989d1c8..11921a43ce 100644 --- a/test/api/set_style.cpp +++ b/test/api/set_style.cpp @@ -18,7 +18,7 @@ TEST(API, SetStyle) { Map map(view, fileSource); - map.start(Map::Mode::Static); + map.start(Map::Mode::Still); map.setStyleJSON("invalid", "test/suite"); diff --git a/test/headless/headless.cpp b/test/headless/headless.cpp index 4ce9b668f1..cccd0d44bd 100644 --- a/test/headless/headless.cpp +++ b/test/headless/headless.cpp @@ -145,7 +145,7 @@ TEST_P(HeadlessTest, render) { DefaultFileSource fileSource(nullptr); Map map(view, fileSource); - map.start(Map::Mode::Static); + map.start(Map::Mode::Still); map.setClasses(classes); map.setStyleJSON(style, "test/suite"); -- cgit v1.2.1