# HG changeset patch # User Benjamin Golinvaux # Date 1585645140 -7200 # Node ID be614695747d214560314f61b4c0f8ce1bb83e0a # Parent ab81ee8fce1f99a801071c8f6337f970f7261365 std::string in viewport ctor diff -r ab81ee8fce1f -r be614695747d Framework/Viewport/SdlViewport.cpp --- a/Framework/Viewport/SdlViewport.cpp Mon Mar 30 14:23:46 2020 +0200 +++ b/Framework/Viewport/SdlViewport.cpp Tue Mar 31 10:59:00 2020 +0200 @@ -74,19 +74,20 @@ } - SdlOpenGLViewport::SdlOpenGLViewport(const char* title, + SdlOpenGLViewport::SdlOpenGLViewport(const std::string& title, unsigned int width, unsigned int height, bool allowDpiScaling) : - context_(title, width, height, allowDpiScaling) + context_(title.c_str(), width, height, allowDpiScaling) { AcquireCompositor(new OpenGLCompositor(context_)); // (*) } - boost::shared_ptr SdlOpenGLViewport::Create(const char* title, - unsigned int width, - unsigned int height, - bool allowDpiScaling) + boost::shared_ptr SdlOpenGLViewport::Create( + const std::string& title, + unsigned int width, + unsigned int height, + bool allowDpiScaling) { boost::shared_ptr that = boost::shared_ptr(new SdlOpenGLViewport(title, width, height, allowDpiScaling)); diff -r ab81ee8fce1f -r be614695747d Framework/Viewport/SdlViewport.h --- a/Framework/Viewport/SdlViewport.h Mon Mar 30 14:23:46 2020 +0200 +++ b/Framework/Viewport/SdlViewport.h Tue Mar 31 10:59:00 2020 +0200 @@ -135,12 +135,12 @@ SdlOpenGLContext context_; private: - SdlOpenGLViewport(const char* title, - unsigned int width, - unsigned int height, - bool allowDpiScaling = true); + SdlOpenGLViewport(const std::string& title, + unsigned int width, + unsigned int height, + bool allowDpiScaling = true); public: - static boost::shared_ptr Create(const char* title, + static boost::shared_ptr Create(const std::string&, unsigned int width, unsigned int height, bool allowDpiScaling = true);