diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index b712e64848..76062e74a1 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit b712e6484894d70a60277bdcf719613b217954a7 +Subproject commit 76062e74a19e8b5238058ae81b0c2507ffadf0b2 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 80e5ff01cb..3e96e60ef2 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -678,22 +678,21 @@ void mainDecodeFun(const std::vector& data, unsigned int) { -void mainLogCallback(Log::Level level, const char* message) { +void mainLogCallback(Log::Level level, std::string_view message) { ZoneScoped - std::string msg = message; switch (level) { case Log::Level::Debug: - LDEBUGC("SGCT", msg); + LDEBUGC("SGCT", message); break; case Log::Level::Info: - LINFOC("SGCT", msg); + LINFOC("SGCT", message); break; case Log::Level::Warning: - LWARNINGC("SGCT", msg); + LWARNINGC("SGCT", message); break; case Log::Level::Error: - LERRORC("SGCT", msg); + LERRORC("SGCT", message); break; } diff --git a/ext/ghoul b/ext/ghoul index bd812defd7..77ce270021 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit bd812defd787ad34119cfe7ecef2be71a7a1553e +Subproject commit 77ce2700218c3f21e6dfefb67553bd646058ff0a diff --git a/include/openspace/util/screenlog.h b/include/openspace/util/screenlog.h index c6ded67ff1..8c496ff57f 100644 --- a/include/openspace/util/screenlog.h +++ b/include/openspace/util/screenlog.h @@ -91,8 +91,8 @@ public: * \param category The category of the log message * \param message The actual log message that was transmitted */ - void log(ghoul::logging::LogLevel level, const std::string& category, - const std::string& message) override; + void log(ghoul::logging::LogLevel level, std::string_view category, + std::string_view message) override; /** * This method removes all the stored LogEntry%s that have expired, calculated by diff --git a/modules/server/src/connection.cpp b/modules/server/src/connection.cpp index 89cb02a96c..e845ad1d9d 100644 --- a/modules/server/src/connection.cpp +++ b/modules/server/src/connection.cpp @@ -85,7 +85,7 @@ Connection::Connection(std::unique_ptr s, AuthenticationTopicKey, [password](bool, const ghoul::Dictionary&, ghoul::MemoryPoolBase* pool) { if (pool) { - void* ptr = pool->alloc(sizeof(AuthorizationTopic)); + void* ptr = pool->allocate(sizeof(AuthorizationTopic)); return new (ptr) AuthorizationTopic(password); } else { diff --git a/modules/sync/syncmodule.cpp b/modules/sync/syncmodule.cpp index 582b7f2146..dc48ce9632 100644 --- a/modules/sync/syncmodule.cpp +++ b/modules/sync/syncmodule.cpp @@ -80,7 +80,7 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) { "HttpSynchronization", [this](bool, const ghoul::Dictionary& dictionary, ghoul::MemoryPoolBase* pool) { if (pool) { - void* ptr = pool->alloc(sizeof(HttpSynchronization)); + void* ptr = pool->allocate(sizeof(HttpSynchronization)); return new (ptr) HttpSynchronization( dictionary, _synchronizationRoot, @@ -101,7 +101,7 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) { "UrlSynchronization", [this](bool, const ghoul::Dictionary& dictionary, ghoul::MemoryPoolBase* pool) { if (pool) { - void* ptr = pool->alloc(sizeof(UrlSynchronization)); + void* ptr = pool->allocate(sizeof(UrlSynchronization)); return new (ptr) UrlSynchronization( dictionary, _synchronizationRoot diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index b3beab370e..a2f5d2ef89 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -994,10 +994,7 @@ void OpenSpaceEngine::loadFonts() { } try { - bool initSuccess = ghoul::fontrendering::FontRenderer::initialize(); - if (!initSuccess) { - LERROR("Error initializing default font renderer"); - } + ghoul::fontrendering::FontRenderer::initialize(); } catch (const ghoul::RuntimeError& err) { LERRORC(err.component, err.message); diff --git a/src/rendering/luaconsole.cpp b/src/rendering/luaconsole.cpp index 20a302f976..97eee2f20e 100644 --- a/src/rendering/luaconsole.cpp +++ b/src/rendering/luaconsole.cpp @@ -687,7 +687,7 @@ void LuaConsole::render() { // Since the overflow is positive, at least one character needs to be removed. const size_t nCharsOverflow = static_cast(std::min( - std::max(1.f, overflow / _font->glyph('m')->width()), + std::max(1.f, overflow / _font->glyph('m')->width), static_cast(currentCommand.size()) )); diff --git a/src/util/screenlog.cpp b/src/util/screenlog.cpp index c5ff3f67e2..e5c865278b 100644 --- a/src/util/screenlog.cpp +++ b/src/util/screenlog.cpp @@ -48,15 +48,15 @@ void ScreenLog::removeExpiredEntries() { _entries.erase(rit, _entries.end() ); } -void ScreenLog::log(LogLevel level, const string& category, const string& message) { +void ScreenLog::log(LogLevel level, std::string_view category, std::string_view message) { std::lock_guard guard(_mutex); if (level >= _logLevel) { _entries.push_back({ level, std::chrono::steady_clock::now(), Log::timeString(), - category, - message + std::string(category), + std::string(message) }); } }