string_view refactor

This commit is contained in:
Jack Andersen
2017-11-12 20:13:32 -10:00
parent 420dcee552
commit cb5d22eed6
18 changed files with 98 additions and 94 deletions

View File

@@ -114,7 +114,7 @@ static Window GetWindowOfEvent(XEvent* event, bool& windowEvent)
return 0;
}
std::shared_ptr<IWindow> _WindowXlibNew(const std::string& title,
std::shared_ptr<IWindow> _WindowXlibNew(std::string_view title,
Display* display, void* xcbConn,
int defaultScreen, XIM xIM, XIMStyle bestInputStyle, XFontSet fontset,
GLXContext lastCtx, void* vulkanHandle, uint32_t drawSamples);

View File

@@ -94,7 +94,7 @@ struct WindowWayland : IWindow
{
GraphicsContextWayland m_gfxCtx;
WindowWayland(const std::string& title)
WindowWayland(std::string_view title)
: m_gfxCtx(IGraphicsContext::EGraphicsAPI::OpenGL3_3, this)
{

View File

@@ -936,7 +936,7 @@ class WindowXlib : public IWindow
bool m_openGL = false;
public:
WindowXlib(const std::string& title,
WindowXlib(std::string_view title,
Display* display, void* xcbConn,
int defaultScreen, XIM xIM, XIMStyle bestInputStyle, XFontSet fontset,
GLXContext lastCtx, void* vulkanHandle, uint32_t drawSamples)
@@ -1131,7 +1131,7 @@ public:
return std::string();
}
void setTitle(const std::string& title)
void setTitle(std::string_view title)
{
const unsigned char* c_title = (unsigned char*)title.c_str();
XLockDisplay(m_xDisp);