summaryrefslogtreecommitdiff
path: root/src/managers/VersionKeeperManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/VersionKeeperManager.cpp')
-rw-r--r--src/managers/VersionKeeperManager.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/managers/VersionKeeperManager.cpp b/src/managers/VersionKeeperManager.cpp
index 6f94fbe5..b1d167fa 100644
--- a/src/managers/VersionKeeperManager.cpp
+++ b/src/managers/VersionKeeperManager.cpp
@@ -34,8 +34,8 @@ CVersionKeeperManager::CVersionKeeperManager() {
return;
}
- if (!isVersionOlderThanRunning(*LASTVER)) {
- Log::logger->log(Log::DEBUG, "CVersionKeeperManager: Read version {} matches or is older than running.", *LASTVER);
+ if (!isMajorVersionOlderThanRunning(*LASTVER)) {
+ Log::logger->log(Log::DEBUG, "CVersionKeeperManager: Read version {} matches or is older than running major.", *LASTVER);
return;
}
@@ -59,25 +59,21 @@ CVersionKeeperManager::CVersionKeeperManager() {
});
}
-bool CVersionKeeperManager::isVersionOlderThanRunning(const std::string& ver) {
+bool CVersionKeeperManager::isMajorVersionOlderThanRunning(const std::string& ver) {
const CVarList verStrings(ver, 0, '.', true);
const int V1 = configStringToInt(verStrings[0]).value_or(0);
const int V2 = configStringToInt(verStrings[1]).value_or(0);
- const int V3 = configStringToInt(verStrings[2]).value_or(0);
static const CVarList runningStrings(HYPRLAND_VERSION, 0, '.', true);
static const int R1 = configStringToInt(runningStrings[0]).value_or(0);
static const int R2 = configStringToInt(runningStrings[1]).value_or(0);
- static const int R3 = configStringToInt(runningStrings[2]).value_or(0);
if (R1 > V1)
return true;
if (R2 > V2)
return true;
- if (R3 > V3)
- return true;
return false;
}