Skip to content

Commit

Permalink
Constness on getters and setters
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Dec 14, 2023
1 parent b3ba4c8 commit 7cad1a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions shared/update_check_settings_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ UpdateCheckerSettingsFile::UpdateCheckerSettingsFile()
loadSettings();
}

bool UpdateCheckerSettingsFile::getAutoCheckEnabled()
const bool UpdateCheckerSettingsFile::getAutoCheckEnabled()
{
return settingAutoCheckEnabled;
}

bool UpdateCheckerSettingsFile::setAutoCheckEnabled(bool enabled)
const bool UpdateCheckerSettingsFile::setAutoCheckEnabled(bool enabled)
{
settingAutoCheckEnabled = enabled;
return saveSettings();
}

Version UpdateCheckerSettingsFile::getLastReportedVersion()
const Version UpdateCheckerSettingsFile::getLastReportedVersion()
{
return settingLastReportedVersion;
}

bool UpdateCheckerSettingsFile::setLastReportedVersion(Version version)
const bool UpdateCheckerSettingsFile::setLastReportedVersion(const Version& version)
{
settingLastReportedVersion = version;
return saveSettings();
Expand Down
8 changes: 4 additions & 4 deletions shared/update_check_settings_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ class UpdateCheckerSettingsFile {
public:
UpdateCheckerSettingsFile();

bool getAutoCheckEnabled();
bool setAutoCheckEnabled(bool enabled);
const bool getAutoCheckEnabled();
const bool setAutoCheckEnabled(bool enabled);

Version getLastReportedVersion();
bool setLastReportedVersion(Version version);
const Version getLastReportedVersion();
const bool setLastReportedVersion(const Version& version);

const bool canRead();
const bool canWrite();
Expand Down

0 comments on commit 7cad1a2

Please sign in to comment.