Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Args::Table::Terminator a constexpr #580

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/caliper/tools-util/Args.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class Args {
bool has_argument;

const char* info;
const char* argument_info;

static const Table Terminator;
const char* argument_info;
};

static constexpr Table Terminator = { nullptr, nullptr, 0, false, nullptr, nullptr };

Args();

Args(const Table table[]);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cali-query/cali-query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace
"List global run metadata. Use with -j, -t, etc. to select output format.",
nullptr
},
Args::Table::Terminator
Args::Terminator
};

/// A node record filter that filters redundant identical node records.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cali-stat/cali-stat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace
},
{ "output", "output", 'o', true, "Set the output file name", "FILE" },
{ "help", "help", 'h', false, "Print help message", nullptr },
Args::Table::Terminator
Args::Terminator
};

class ReuseStat {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/mpi-caliquery/mpi-caliquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Args::Table option_table[] = {
{ "verbose", "verbose", 'v', false, "Be verbose.", nullptr },
{ "help", "help", 'h', true, "Print help message", nullptr },
{ "output", "output", 'o', true, "Set the output file name", "FILE" },
Args::Table::Terminator
Args::Terminator
};


Expand Down
2 changes: 0 additions & 2 deletions src/tools/util/Args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
using namespace std;
using namespace util;

const Args::Table Args::Table::Terminator { 0, 0, 0, false, 0, 0 };

struct Args::ArgsImpl
{
vector<Args::Table> m_options; ///< Option list
Expand Down
2 changes: 1 addition & 1 deletion test/cali-annotation-perftest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ int main(int argc, char* argv[])
{ "quiet", "quiet", 'q', false, "Don't print output", nullptr },
{ "help", "help", 'h', false, "Print help", nullptr },

util::Args::Table::Terminator
util::Args::Terminator
};

// --- initialization
Expand Down
2 changes: 1 addition & 1 deletion test/cali-flush-perftest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int main(int argc, char* argv[])

{ "help", "help", 'h', false, "Print help", nullptr },

util::Args::Table::Terminator
util::Args::Terminator
};

// --- Initialization
Expand Down
Loading