Skip to content

Commit

Permalink
fix: symbol_params initialiser
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier authored Aug 1, 2024
1 parent 814b4f7 commit 977980c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 4 additions & 3 deletions include/dylib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ class dylib {
static constexpr bool no_filename_decorations = false;

struct symbol_params {
bool demangle = false;
bool loadable = false;
symbol_params(): demangle(false), loadable(false) {}
bool demangle;
bool loadable;
};

/**
Expand Down Expand Up @@ -226,7 +227,7 @@ class dylib {
*
* @return the list of symbols
*/
std::vector<std::string> symbols(symbol_params params = {}) const;
std::vector<std::string> symbols(symbol_params params = symbol_params()) const;

/**
* @return the dynamic library handle
Expand Down
4 changes: 0 additions & 4 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ TEST(filesystem, basic_test) {
TEST(cpp_symbols, basic_test) {
dylib lib("./", "dynamic_lib");

auto symbols = lib.symbols(true);
for (auto &sym : symbols)
std::cout << sym << std::endl;

auto mean = lib.get_variable<double>("meaning_of_life");
EXPECT_EQ(mean, 42);

Expand Down

0 comments on commit 977980c

Please sign in to comment.