Cleanup code with designated initializer lists

This commit is contained in:
Alexander Bock
2023-01-22 23:01:32 +01:00
parent 3c6fc51ac2
commit d52c5dd0d9
69 changed files with 532 additions and 411 deletions
+3 -3
View File
@@ -172,9 +172,9 @@ std::shared_ptr<DownloadManager::FileFuture> DownloadManager::downloadFile(
}
ProgressInformation p = {
future,
std::chrono::system_clock::now(),
&progressCb
.future = future,
.startTime = std::chrono::system_clock::now(),
.callback = &progressCb
};
#if LIBCURL_VERSION_NUM >= 0x072000
// xferinfo was introduced in 7.32.0, if a lower curl version is used the
+1 -1
View File
@@ -171,7 +171,7 @@ std::vector<OpenSpaceModule*> ModuleEngine::modules() const {
}
ghoul::systemcapabilities::Version ModuleEngine::requiredOpenGLVersion() const {
ghoul::systemcapabilities::Version version = { 0, 0, 0 };
ghoul::systemcapabilities::Version version = { .major = 0, .minor = 0, .release = 0 };
for (const std::unique_ptr<OpenSpaceModule>& m : _modules) {
version = std::max(version, m->requiredOpenGLVersion());
+5 -1
View File
@@ -486,7 +486,11 @@ void OpenSpaceEngine::initializeGL() {
bool debugActive = global::configuration->openGLDebugContext.isActive;
// Debug output is not available before 4.3
const ghoul::systemcapabilities::Version minVersion = { 4, 3, 0 };
const ghoul::systemcapabilities::Version minVersion = {
.major = 4,
.minor = 3,
.release = 0
};
if (debugActive && OpenGLCap.openGLVersion() < minVersion) {
LINFO("OpenGL Debug context requested, but insufficient version available");
debugActive = false;