diff --git a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp index bb250d98d1..f025897a14 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/assettreemodel.cpp @@ -85,7 +85,8 @@ namespace { const int levelChange = elem.level - level; if (levelChange == 0) { - parent->insertChildren(++nChildInsert, 1, 3); + nChildInsert++; + parent->insertChildren(nChildInsert, 1, 3); parent->child(nChildInsert)->setData( 0, QString::fromStdString(elem.line) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 4e1b1fdab9..98be6301fb 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 4e1b1fdab9adadb224fbfb24e0ce7fb551560d1f +Subproject commit 98be6301fb8884f4c3906c52e67d2786593f6da6 diff --git a/ext/ghoul b/ext/ghoul index 4ff211d7aa..77eb9907af 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 4ff211d7aad2907f957081181586ecdec7c3bc7e +Subproject commit 77eb9907af7885d7535564f1da49931271fb9965 diff --git a/include/openspace/util/timeline.inl b/include/openspace/util/timeline.inl index c4663e8dfb..41fcd558a5 100644 --- a/include/openspace/util/timeline.inl +++ b/include/openspace/util/timeline.inl @@ -32,7 +32,8 @@ Keyframe::Keyframe(size_t i, double t, T d) template void Timeline::addKeyframe(double timestamp, T&& data) { - Keyframe keyframe(++_nextKeyframeId, timestamp, std::move(data)); + _nextKeyframeId++; + Keyframe keyframe(_nextKeyframeId, timestamp, std::move(data)); const auto iter = std::upper_bound( _keyframes.cbegin(), _keyframes.cend(), @@ -44,7 +45,8 @@ void Timeline::addKeyframe(double timestamp, T&& data) { template void Timeline::addKeyframe(double timestamp, const T& data) { - Keyframe keyframe(++_nextKeyframeId, timestamp, data); + _nextKeyframeId++; + Keyframe keyframe(_nextKeyframeId, timestamp, data); const auto iter = std::upper_bound( _keyframes.cbegin(), _keyframes.cend(), diff --git a/modules/base/rendering/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp index bf68e9ab1a..d7a9e281e1 100644 --- a/modules/base/rendering/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -769,7 +769,7 @@ void RenderableModel::render(const RenderData& data, RendererTasks&) { _lightDirectionsViewSpaceBuffer[nLightSources] = lightSource->directionViewSpace(data); - ++nLightSources; + nLightSources++; } if (_uniformCache.performShading != -1) { diff --git a/modules/base/rendering/renderabletrailorbit.cpp b/modules/base/rendering/renderabletrailorbit.cpp index 87f7e77aff..f4cb5c151f 100644 --- a/modules/base/rendering/renderabletrailorbit.cpp +++ b/modules/base/rendering/renderabletrailorbit.cpp @@ -408,7 +408,7 @@ RenderableTrailOrbit::UpdateReport RenderableTrailOrbit::updateTrails( else { // Move the current pointer fowards one step to be used as the new // floating - ++_primaryRenderInformation.first; + _primaryRenderInformation.first++; } } diff --git a/modules/exoplanets/exoplanetsmodule_lua.inl b/modules/exoplanets/exoplanetsmodule_lua.inl index ddfd048314..587cfcfe99 100644 --- a/modules/exoplanets/exoplanetsmodule_lua.inl +++ b/modules/exoplanets/exoplanetsmodule_lua.inl @@ -130,7 +130,7 @@ std::vector hostStarsWithSufficientData() { // Read number of lines int nExoplanets = 0; while (ghoul::getline(lookupTableFile, line)) { - ++nExoplanets; + nExoplanets++; } lookupTableFile.clear(); lookupTableFile.seekg(0); diff --git a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp index 89790c50f4..cd07d51cac 100644 --- a/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp +++ b/modules/exoplanets/tasks/exoplanetsdatapreparationtask.cpp @@ -148,7 +148,7 @@ void ExoplanetsDataPreparationTask::perform( int total = 0; std::string row; while (ghoul::getline(inputDataFile, row)) { - ++total; + total++; } inputDataFile.clear(); inputDataFile.seekg(0); @@ -161,7 +161,7 @@ void ExoplanetsDataPreparationTask::perform( int exoplanetCount = 0; while (ghoul::getline(inputDataFile, row)) { - ++exoplanetCount; + exoplanetCount++; progressCallback(static_cast(exoplanetCount) / static_cast(total)); PlanetData planetData = parseDataRow( diff --git a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp index e40a6aa34b..64d2d1efda 100644 --- a/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp +++ b/modules/fieldlinessequence/tasks/kameleonvolumetofieldlinestask.cpp @@ -193,7 +193,7 @@ void KameleonVolumeToFieldlinesTask::perform( throw ghoul::MissingCaseException(); } } - ++fileNumber; + fileNumber++; } // Ideally, we would want to signal about progress earlier as well, but diff --git a/modules/fieldlinessequence/util/fieldlinesstate.cpp b/modules/fieldlinessequence/util/fieldlinesstate.cpp index 8bbd3562d2..ce7ac509b1 100644 --- a/modules/fieldlinessequence/util/fieldlinesstate.cpp +++ b/modules/fieldlinessequence/util/fieldlinesstate.cpp @@ -371,7 +371,7 @@ void FieldlinesState::saveStateToJson(const std::string& absPath) { size_t pointIndex = 0; for (size_t lineIndex = 0; lineIndex < nLines; lineIndex++) { json jData = json::array(); - for (GLsizei i = 0; i < _lineCount[lineIndex]; i++, ++pointIndex) { + for (GLsizei i = 0; i < _lineCount[lineIndex]; i++, pointIndex++) { const glm::vec3 pos = _vertexPositions[pointIndex]; json jDataElement = { pos.x, pos.y, pos.z }; diff --git a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp index d592231b4a..1597adf846 100644 --- a/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp +++ b/modules/fieldlinessequence/util/kameleonfieldlinehelper.cpp @@ -176,7 +176,7 @@ extractSeedPointsFromFiles(std::filesystem::path path, size_t nth) outVec.push_back(std::move(point)); } } - ++linenumber; + linenumber++; } if (outVec.empty()) { diff --git a/modules/gaia/rendering/octreemanager.cpp b/modules/gaia/rendering/octreemanager.cpp index 40714528e8..eab557afaa 100644 --- a/modules/gaia/rendering/octreemanager.cpp +++ b/modules/gaia/rendering/octreemanager.cpp @@ -1022,7 +1022,7 @@ bool OctreeManager::insertInNode(OctreeNode& node, const std::vector& sta storeStarData(node, starValues); } - return insertInNode(*node.children[index], starValues, ++depth); + return insertInNode(*node.children[index], starValues, depth + 1); } void OctreeManager::sliceNodeLodCache(OctreeNode& node) { diff --git a/modules/kameleon/src/kameleonwrapper.cpp b/modules/kameleon/src/kameleonwrapper.cpp index 08c0d3046f..06c8766ce9 100644 --- a/modules/kameleon/src/kameleonwrapper.cpp +++ b/modules/kameleon/src/kameleonwrapper.cpp @@ -837,7 +837,7 @@ KameleonWrapper::TraceLine KameleonWrapper::traceCartesianFieldline( pos = pos + (step / 6.f) * (k1 + 2.f * k2 + 2.f * k3 + k4); - ++numSteps; + numSteps++; if (numSteps > MaxSteps) { LDEBUG(std::format("Max number of steps taken ({})", MaxSteps)); break; @@ -951,7 +951,7 @@ KameleonWrapper::TraceLine KameleonWrapper::traceLorentzTrajectory( v0 = v0 + step / 6.f * (k1 + 2.f * k2 + 2.f * k3 + k4); - ++numSteps; + numSteps++; if (numSteps > MaxSteps) { LDEBUG(std::format("Max number of steps taken ({})", MaxSteps)); break; diff --git a/modules/multiresvolume/rendering/errorhistogrammanager.cpp b/modules/multiresvolume/rendering/errorhistogrammanager.cpp index 2017365154..9e24526862 100644 --- a/modules/multiresvolume/rendering/errorhistogrammanager.cpp +++ b/modules/multiresvolume/rendering/errorhistogrammanager.cpp @@ -73,7 +73,8 @@ bool ErrorHistogramManager::buildHistograms(int numBins) { if (!success) { return false; } - pb.print(++processedLeaves); + processedLeaves++; + pb.print(processedLeaves); } } diff --git a/modules/space/rendering/renderableconstellationbounds.cpp b/modules/space/rendering/renderableconstellationbounds.cpp index 0ddd6127ac..39e9e70989 100644 --- a/modules/space/rendering/renderableconstellationbounds.cpp +++ b/modules/space/rendering/renderableconstellationbounds.cpp @@ -340,7 +340,7 @@ bool RenderableConstellationBounds::loadVertexFile() { static_cast(rectangularValues[1]), static_cast(rectangularValues[2]) }); - ++currentLineNumber; + currentLineNumber++; } // Due to the way we read the file, the first (empty) constellation bounds will not diff --git a/modules/space/rendering/renderablefluxnodes.cpp b/modules/space/rendering/renderablefluxnodes.cpp index 39a8f76ee0..41f4786874 100644 --- a/modules/space/rendering/renderablefluxnodes.cpp +++ b/modules/space/rendering/renderablefluxnodes.cpp @@ -624,7 +624,7 @@ void RenderableFluxNodes::populateStartTimes() { std::string columnName; // loops through the names/columns in first line/header while (s >> columnName) { - ++nColumns; + nColumns++; } while (ghoul::getline(tfs, line)) { // for each line of data std::istringstream iss(line); diff --git a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp index 36129791a5..77b288fa28 100644 --- a/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp +++ b/modules/spacecraftinstruments/rendering/renderableplanetprojection.cpp @@ -478,7 +478,7 @@ void RenderablePlanetProjection::render(const RenderData& data, RendererTasks&) const std::shared_ptr t = _projectionComponent.loadProjectionTexture(img.path); imageProjectGPU(*t, projMatrix); - ++nProjections; + nProjections++; } catch (const SpiceManager::SpiceException& e) { LERRORC(e.component, e.what()); diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 054f937466..14490592a1 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -362,7 +362,7 @@ HttpSynchronization::trySyncFromUrl(std::string url) { break; } else { - ++downloadTry; + downloadTry++; std::this_thread::sleep_for(std::chrono::seconds(1)); } } diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 1d000607cf..9b41d364ea 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -1081,8 +1081,9 @@ void TouchInteraction::step(double dt, bool directTouch) { global::navigationHandler->orbitalNavigator().updateOnCameraInteraction(); #ifdef TOUCH_DEBUG_PROPERTIES - //Show velocity status every N frames - if (++stepVelUpdate >= 60) { + // Show velocity status every N frames + stepVelUpdate++; + if (stepVelUpdate >= 60) { stepVelUpdate = 0; LINFO(std::format( "DistToFocusNode {} stepZoomVelUpdate {}", diff --git a/modules/volume/envelope.cpp b/modules/volume/envelope.cpp index 8126f51490..247f59f68b 100644 --- a/modules/volume/envelope.cpp +++ b/modules/volume/envelope.cpp @@ -85,7 +85,7 @@ bool Envelope::isValueInEnvelope(float pos) const { bool Envelope::isEnvelopeValid() const { for (auto currentIter = _points.begin(), nextIter = currentIter + 1; nextIter != _points.end(); - ++currentIter, ++nextIter) + currentIter++, nextIter++) { if (currentIter->position.first > nextIter->position.first) { return false; @@ -104,7 +104,7 @@ glm::vec4 Envelope::valueAtPosition(float pos) const { if (afterIter == _points.end()) { return glm::vec4(0.f, 0.f, 0.f ,0.f); } - ++afterIter; + afterIter++; } if (afterIter->position.first == pos) { return glm::vec4(afterIter->color, afterIter->position.second); diff --git a/modules/webbrowser/src/eventhandler.cpp b/modules/webbrowser/src/eventhandler.cpp index 106e931f24..b92e7934c8 100644 --- a/modules/webbrowser/src/eventhandler.cpp +++ b/modules/webbrowser/src/eventhandler.cpp @@ -365,7 +365,7 @@ bool EventHandler::mouseButtonCallback(MouseButton button, MouseAction action, } else { if (isDoubleClick(state)) { - ++clickCount; + clickCount++; } else { state.lastClickTime = std::chrono::high_resolution_clock::now(); diff --git a/src/rendering/dashboard.cpp b/src/rendering/dashboard.cpp index b75bca2218..2b8afbcad8 100644 --- a/src/rendering/dashboard.cpp +++ b/src/rendering/dashboard.cpp @@ -98,7 +98,7 @@ void Dashboard::addDashboardItem(std::unique_ptr item) { else { item->setIdentifier(originalIdentifier + std::to_string(suffix)); item->setGuiName(originalIdentifier + " " + std::to_string(suffix)); - ++suffix; + suffix++; } } diff --git a/src/rendering/helper.cpp b/src/rendering/helper.cpp index 7c11759b27..08c723f8dd 100644 --- a/src/rendering/helper.cpp +++ b/src/rendering/helper.cpp @@ -880,7 +880,7 @@ void LightSourceRenderData::updateBasedOnLightSources(const RenderData& renderDa directionsViewSpaceBuffer[nEnabledLightSources] = lightSource->directionViewSpace(renderData); - ++nEnabledLightSources; + nEnabledLightSources++; } nLightSources = nEnabledLightSources; } diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index 68ea097572..3e5429c487 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -609,10 +609,10 @@ void LoadingScreen::renderLogMessages() const { if (charactersSinceNewLine > MessageLength) { result << '\n'; charactersSinceNewLine = static_cast(word.size()); - ++nRows; + nRows++; } result << word << ' '; - ++charactersSinceNewLine; + charactersSinceNewLine++; } } @@ -625,7 +625,7 @@ void LoadingScreen::renderLogMessages() const { it.message.size() < MessageLength ? it.message : result.str(), ghoul::toColor(it.level) ); - ++nRows; + nRows++; } const glm::vec2 dpiScaling = global::windowDelegate->dpiScaling(); @@ -650,7 +650,7 @@ void LoadingScreen::renderLogMessages() const { text, ghoul::toColor(level) ); - ++row; + row++; } } diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index cc947c6138..2cc65418a6 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -914,7 +914,7 @@ float RenderEngine::combinedBlackoutFactor() const { void RenderEngine::postDraw() { ZoneScoped; - ++_frameNumber; + _frameNumber++; } Scene* RenderEngine::scene() { @@ -1417,7 +1417,7 @@ void RenderEngine::renderScreenLog() { message, white ); - ++nRows; + nRows++; } } diff --git a/src/util/dynamicfilesequencedownloader.cpp b/src/util/dynamicfilesequencedownloader.cpp index 357728ce7c..ef28914783 100644 --- a/src/util/dynamicfilesequencedownloader.cpp +++ b/src/util/dynamicfilesequencedownloader.cpp @@ -338,7 +338,7 @@ void DynamicFileSequenceDownloader::requestAvailableFiles(std::string httpDataRe fileElement.state = File::State::Available; } _availableData.push_back(std::move(fileElement)); - ++index; + index++; } const double cadence = calculateCadence(); @@ -446,7 +446,7 @@ void DynamicFileSequenceDownloader::checkForFinishedDownloads() { } // The file is not finished downloading, move on to next else { - ++currentIt; + currentIt++; } // Since in the if statement one is removed and else statement it got incremented, diff --git a/src/util/ellipsoid.cpp b/src/util/ellipsoid.cpp index f1a973fc33..fa0cd9676c 100644 --- a/src/util/ellipsoid.cpp +++ b/src/util/ellipsoid.cpp @@ -83,7 +83,7 @@ glm::dvec3 Ellipsoid::geodeticSurfaceProjection(const glm::dvec3& p) const { s = glm::dot(p2 / (_cached.radiiSquared * d2), glm::dvec3(1.0)) - 1.0; dSdA = -2.0 * glm::dot(p2 / (_cached.radiiToTheFourth * d3), glm::dvec3(1.0)); - ++nIterations; + nIterations++; } while (std::abs(s) > Epsilon && nIterations < MaxIterations); diff --git a/src/util/histogram.cpp b/src/util/histogram.cpp index 3628934076..ec21445525 100644 --- a/src/util/histogram.cpp +++ b/src/util/histogram.cpp @@ -316,7 +316,7 @@ float Histogram::highestBinValue(bool equalized, int overBins) { } value += _data[i]; - value /= static_cast(++num); + value /= static_cast(num + 1); if (value > highestValue) { highestBin = i; @@ -329,7 +329,7 @@ float Histogram::highestBinValue(bool equalized, int overBins) { const float low = _minValue + static_cast(highestBin) / _numBins * (_maxValue - _minValue); const float high = low + (_maxValue - _minValue) / static_cast(_numBins); - return (high+low) / 2.f; + return (high + low) / 2.f; } else { return highestBin / static_cast(_numBins); diff --git a/src/util/sphere.cpp b/src/util/sphere.cpp index 457bf9b7d6..94b5c588a4 100644 --- a/src/util/sphere.cpp +++ b/src/util/sphere.cpp @@ -85,7 +85,7 @@ Sphere::Sphere(glm::vec3 radius, int segments) _varray[nr].tex[0] = t1; _varray[nr].tex[1] = t2; - ++nr; + nr++; } } @@ -95,18 +95,18 @@ Sphere::Sphere(glm::vec3 radius, int segments) for (int j = 0; j < segments; j++) { const int t = segments + 1; _iarray[nr] = t * (i - 1) + j + 0; //1 - ++nr; + nr++; _iarray[nr] = t * (i + 0) + j + 0; //2 - ++nr; + nr++; _iarray[nr] = t * (i + 0) + j + 1; //3 - ++nr; + nr++; _iarray[nr] = t * (i - 1) + j + 0; //4 - ++nr; + nr++; _iarray[nr] = t * (i + 0) + j + 1; //5 - ++nr; + nr++; _iarray[nr] = t * (i - 1) + j + 1; //6 - ++nr; + nr++; } } }