First commit

This commit is contained in:
Alexander Bock
2020-08-30 22:00:13 +02:00
parent 19c110a4c2
commit d0508be631
9 changed files with 17 additions and 21 deletions
+1 -4
View File
@@ -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);
+1 -1
View File
@@ -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<size_t>(std::min(
std::max(1.f, overflow / _font->glyph('m')->width()),
std::max(1.f, overflow / _font->glyph('m')->width),
static_cast<float>(currentCommand.size())
));
+3 -3
View File
@@ -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<std::mutex> guard(_mutex);
if (level >= _logLevel) {
_entries.push_back({
level,
std::chrono::steady_clock::now(),
Log::timeString(),
category,
message
std::string(category),
std::string(message)
});
}
}