mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 01:59:15 -05:00
Cleanup code with designated initializer lists
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user