Skip to content

Commit

Permalink
Explicitly marked various private methods of the Application class as…
Browse files Browse the repository at this point in the history
… const.
  • Loading branch information
xvitaly committed Oct 6, 2024
1 parent f6b376b commit 60241ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/application/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void Application::InitClassMembers()
ZSwapDebugger = std::make_unique<ZSwapDebug>();
}

void Application::InitCmdLineOptions()
void Application::InitCmdLineOptions() const
{
boost::program_options::options_description OptionsGeneral("General options");
OptionsGeneral.add_options()
Expand Down Expand Up @@ -333,7 +333,7 @@ void Application::InitCmdLineOptions()
CmdLineOptions -> add(OptionsGeneral).add(OptionsConfiguration).add(OptionsZSwap);
}

void Application::InitConfigOptions()
void Application::InitConfigOptions() const
{
ConfigOptions -> add_options()
("zswap.enabled", boost::program_options::value<std::string>(), "Enable or disable the ZSwap kernel module.")
Expand All @@ -348,7 +348,7 @@ void Application::InitConfigOptions()
;
}

void Application::ParseCmdLine(int argc, char** argv)
void Application::ParseCmdLine(int argc, char** argv) const
{
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, *CmdLineOptions), *CmdLine);
CmdLine -> notify();
Expand Down
6 changes: 3 additions & 3 deletions src/app/application/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ class Application
* Initializes the list of available command-line options
* with their descriptions.
*/
void InitCmdLineOptions();
void InitCmdLineOptions() const;

/**
* Initializes the list of available configuration file options
* with their descriptions.
*/
void InitConfigOptions();
void InitConfigOptions() const;

/**
* Parses command-line arguments to the map.
* @param argc Command-line arguments count.
* @param argv Command-line arguments array.
*/
void ParseCmdLine(int, char**);
void ParseCmdLine(int, char**) const;

/**
* Reads and parses the specified configuration file.
Expand Down

0 comments on commit 60241ff

Please sign in to comment.