aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2025-01-27 11:27:25 +0100
committerJán Sučan <jan@jansucan.com>2025-01-27 15:22:36 +0100
commit67cb1e0442a431fd07aa755fc390651d6986bd35 (patch)
tree6b35429c3903c0e661fd5c6498c4b7c9afde50f2
parent7b2955b20ba51e27a72a881bcf7abdec73d7942c (diff)
Prefix class member variables by m_
-rw-r--r--src/options.cpp36
-rw-r--r--src/options.h14
2 files changed, 25 insertions, 25 deletions
diff --git a/src/options.cpp b/src/options.cpp
index a9dd284..ee1d8a2 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -53,50 +53,50 @@ printUsage()
std::cout << " Or: " << PROGRAM_NAME_STR << " help" << std::endl;
}
-Create::Create() : buffer_size{Options::DEFAULT_BUFFER_SIZE} {}
+Create::Create() : m_buffer_size{Options::DEFAULT_BUFFER_SIZE} {}
uint32_t
Create::getBufferSize() const
{
- return buffer_size;
+ return m_buffer_size;
}
std::filesystem::path
Create::getInFilePath() const
{
- return in_file_path;
+ return m_in_file_path;
}
std::filesystem::path
Create::getBaseFilePath() const
{
- return base_file_path;
+ return m_base_file_path;
}
std::filesystem::path
Create::getOutFilePath() const
{
- return out_file_path;
+ return m_out_file_path;
}
-Restore::Restore() : buffer_size{Options::DEFAULT_BUFFER_SIZE} {}
+Restore::Restore() : m_buffer_size{Options::DEFAULT_BUFFER_SIZE} {}
uint32_t
Restore::getBufferSize() const
{
- return buffer_size;
+ return m_buffer_size;
}
std::filesystem::path
Restore::getDiffFilePath() const
{
- return diff_file_path;
+ return m_diff_file_path;
}
std::filesystem::path
Restore::getOutFilePath() const
{
- return out_file_path;
+ return m_out_file_path;
}
bool
@@ -169,9 +169,9 @@ Parser::parseCreate(int argc, char **argv)
/* Convert numbers in the arguments */
if ((arg_buffer_size != NULL) &&
- parse_unsigned(arg_buffer_size, &(opts.buffer_size))) {
+ parse_unsigned(arg_buffer_size, &(opts.m_buffer_size))) {
throw Error("incorrect buffer size");
- } else if (opts.buffer_size == 0) {
+ } else if (opts.m_buffer_size == 0) {
throw Error("buffer size cannot be 0");
}
@@ -185,9 +185,9 @@ Parser::parseCreate(int argc, char **argv)
throw Error("too many arguments");
}
- opts.in_file_path = arg_input_file;
- opts.base_file_path = arg_base_file;
- opts.out_file_path = arg_output_file;
+ opts.m_in_file_path = arg_input_file;
+ opts.m_base_file_path = arg_base_file;
+ opts.m_out_file_path = arg_output_file;
return opts;
}
@@ -231,9 +231,9 @@ Parser::parseRestore(int argc, char **argv)
/* Convert numbers in the arguments */
if ((arg_buffer_size != NULL) &&
- parse_unsigned(arg_buffer_size, &(opts.buffer_size))) {
+ parse_unsigned(arg_buffer_size, &(opts.m_buffer_size))) {
throw Error("incorrect buffer size");
- } else if (opts.buffer_size == 0) {
+ } else if (opts.m_buffer_size == 0) {
throw Error("buffer size cannot be 0");
}
@@ -245,8 +245,8 @@ Parser::parseRestore(int argc, char **argv)
throw Error("too many arguments");
}
- opts.diff_file_path = arg_diff_file;
- opts.out_file_path = arg_output_file;
+ opts.m_diff_file_path = arg_diff_file;
+ opts.m_out_file_path = arg_output_file;
return opts;
}
diff --git a/src/options.h b/src/options.h
index 0ea11d8..4aa359a 100644
--- a/src/options.h
+++ b/src/options.h
@@ -57,10 +57,10 @@ class Create
std::filesystem::path getOutFilePath() const;
private:
- uint32_t buffer_size;
- std::filesystem::path in_file_path;
- std::filesystem::path base_file_path;
- std::filesystem::path out_file_path;
+ uint32_t m_buffer_size;
+ std::filesystem::path m_in_file_path;
+ std::filesystem::path m_base_file_path;
+ std::filesystem::path m_out_file_path;
};
class Restore
@@ -75,9 +75,9 @@ class Restore
std::filesystem::path getOutFilePath() const;
private:
- uint32_t buffer_size;
- std::filesystem::path diff_file_path;
- std::filesystem::path out_file_path;
+ uint32_t m_buffer_size;
+ std::filesystem::path m_diff_file_path;
+ std::filesystem::path m_out_file_path;
};
class Parser