summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-12-22 13:14:44 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-12-22 13:14:44 -0800
commit7eaa4fabde5de99c8a0e8f8f3dc5362bc0887d24 (patch)
tree3d493f764a393afb3c4e934281aff519612bc966 /src
parent2731b582f24063e339c047635c6d7b2316eb8037 (diff)
parent0771e5046064875d323245873f457b87e8c4b447 (diff)
downloadqtlocation-mapboxgl-7eaa4fabde5de99c8a0e8f8f3dc5362bc0887d24.tar.gz
Merge pull request #731 from mapbox/view-rename
Rename View functions to match conventions
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map.cpp14
-rw-r--r--src/mbgl/map/transform.cpp16
2 files changed, 15 insertions, 15 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index ea4115f05c..ea95c925c8 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -33,7 +33,7 @@
#include <uv.h>
// Check libuv library version.
-const static bool uv_version_check = []() {
+const static bool uvVersionCheck = []() {
const unsigned int version = uv_version();
const unsigned int major = (version >> 16) & 0xFF;
const unsigned int minor = (version >> 8) & 0xFF;
@@ -55,7 +55,7 @@ const static bool uv_version_check = []() {
#include <zlib.h>
// Check zlib library version.
-const static bool zlib_version_check = []() {
+const static bool zlibVersionCheck = []() {
const char *const version = zlibVersion();
if (version[0] != ZLIB_VERSION[0]) {
throw std::runtime_error(mbgl::util::sprintf<96>(
@@ -68,7 +68,7 @@ const static bool zlib_version_check = []() {
#include <sqlite3.h>
// Check sqlite3 library version.
-const static bool sqlite_version_check = []() {
+const static bool sqliteVersionCheck = []() {
if (sqlite3_libversion_number() != SQLITE_VERSION_NUMBER) {
throw std::runtime_error(mbgl::util::sprintf<96>(
"sqlite3 libversion mismatch: headers report %d, but library reports %d",
@@ -287,9 +287,9 @@ void Map::terminate() {
void Map::setup() {
assert(std::this_thread::get_id() == mapThread);
assert(painter);
- view.make_active();
+ view.activate();
painter->setup();
- view.make_inactive();
+ view.deactivate();
}
void Map::setStyleURL(const std::string &url) {
@@ -613,7 +613,7 @@ void Map::prepare() {
}
void Map::render() {
- view.make_active();
+ view.activate();
assert(painter);
painter->render(*style, activeSources,
@@ -623,5 +623,5 @@ void Map::render() {
update();
}
- view.make_inactive();
+ view.deactivate();
}
diff --git a/src/mbgl/map/transform.cpp b/src/mbgl/map/transform.cpp
index d05d1f7446..bf79d24b5d 100644
--- a/src/mbgl/map/transform.cpp
+++ b/src/mbgl/map/transform.cpp
@@ -29,7 +29,7 @@ bool Transform::resize(const uint16_t w, const uint16_t h, const float ratio,
if (final.width != w || final.height != h || final.pixelRatio != ratio ||
final.framebuffer[0] != fb_w || final.framebuffer[1] != fb_h) {
- view.notify_map_change(MapChangeRegionWillChange);
+ view.notifyMapChange(MapChangeRegionWillChange);
current.width = final.width = w;
current.height = final.height = h;
@@ -38,7 +38,7 @@ bool Transform::resize(const uint16_t w, const uint16_t h, const float ratio,
current.framebuffer[1] = final.framebuffer[1] = fb_h;
constrain(current.scale, current.y);
- view.notify_map_change(MapChangeRegionDidChange);
+ view.notifyMapChange(MapChangeRegionDidChange);
return true;
} else {
@@ -57,7 +57,7 @@ void Transform::moveBy(const double dx, const double dy, const timestamp duratio
void Transform::_moveBy(const double dx, const double dy, const timestamp duration) {
// This is only called internally, so we don't need a lock here.
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionWillChangeAnimated :
MapChangeRegionWillChange);
@@ -78,7 +78,7 @@ void Transform::_moveBy(const double dx, const double dy, const timestamp durati
std::make_shared<util::ease_transition<double>>(current.y, final.y, current.y, start, duration));
}
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionDidChangeAnimated :
MapChangeRegionDidChange,
duration);
@@ -268,7 +268,7 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl
const timestamp duration) {
// This is only called internally, so we don't need a lock here.
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionWillChangeAnimated :
MapChangeRegionWillChange);
@@ -297,7 +297,7 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl
Bc = s / 360;
Cc = s / (2 * M_PI);
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionDidChangeAnimated :
MapChangeRegionDidChange,
duration);
@@ -376,7 +376,7 @@ void Transform::setAngle(const double new_angle, const double cx, const double c
void Transform::_setAngle(double new_angle, const timestamp duration) {
// This is only called internally, so we don't need a lock here.
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionWillChangeAnimated :
MapChangeRegionWillChange);
@@ -395,7 +395,7 @@ void Transform::_setAngle(double new_angle, const timestamp duration) {
current.angle, final.angle, current.angle, start, duration));
}
- view.notify_map_change(duration ?
+ view.notifyMapChange(duration ?
MapChangeRegionDidChangeAnimated :
MapChangeRegionDidChange,
duration);