diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-10-07 16:26:21 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-10-07 16:26:21 -0400 |
commit | 36b7bb0c0991b3c5c3a7d001139b120bee854484 (patch) | |
tree | 43e259265c7d3d6d1afcae177313adcbffd50295 /common | |
parent | 5cc6b26229597ef78bd87d21367b75f2051b7314 (diff) | |
download | qtlocation-mapboxgl-36b7bb0c0991b3c5c3a7d001139b120bee854484.tar.gz |
clean up shared_ptr usage in HeadlessView
Diffstat (limited to 'common')
-rw-r--r-- | common/headless_view.cpp | 12 | ||||
-rw-r--r-- | common/headless_view.hpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp index b8a2fa360b..d11f63dbd5 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -5,18 +5,18 @@ namespace mbgl { -HeadlessView::HeadlessView() : display_ptr_(std::make_shared<HeadlessDisplay>()) { +HeadlessView::HeadlessView() : display_(std::make_shared<HeadlessDisplay>()) { createContext(); } -HeadlessView::HeadlessView(std::shared_ptr<HeadlessDisplay> display_ptr) - : display_ptr_(display_ptr) { +HeadlessView::HeadlessView(std::shared_ptr<HeadlessDisplay> display) + : display_(display) { createContext(); } void HeadlessView::createContext() { #if MBGL_USE_CGL - CGLError error = CGLCreateContext(display_ptr_->pixelFormat, NULL, &gl_context); + CGLError error = CGLCreateContext(display_->pixelFormat, NULL, &gl_context); if (error) { fprintf(stderr, "Error creating GL context object\n"); return; @@ -30,8 +30,8 @@ void HeadlessView::createContext() { #endif #if MBGL_USE_GLX - x_display = display_ptr_->x_display; - x_info = display_ptr_->x_info; + x_display = display_->x_display; + x_info = display_->x_info; gl_context = glXCreateContext(x_display, x_info, 0, GL_TRUE); if (gl_context == nullptr) { diff --git a/common/headless_view.hpp b/common/headless_view.hpp index 3ad5a669a5..13a5b01099 100644 --- a/common/headless_view.hpp +++ b/common/headless_view.hpp @@ -20,7 +20,7 @@ class HeadlessDisplay; class HeadlessView : public View { public: HeadlessView(); - HeadlessView(std::shared_ptr<HeadlessDisplay> display_ptr); + HeadlessView(std::shared_ptr<HeadlessDisplay> display); ~HeadlessView(); void createContext(); @@ -38,7 +38,7 @@ private: private: - std::shared_ptr<HeadlessDisplay> display_ptr_; + std::shared_ptr<HeadlessDisplay> display_; #if MBGL_USE_CGL CGLContextObj gl_context; |