Skip to content
Merged
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 interface/cuvis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ namespace cuvis
/**
* @copydoc cuvis_init
*/
static void init(std::string const& settings_path, int global_loglevel = 4);
static void init(std::string const& settings_path, int global_loglevel = 4, std ::string logfile_name = "");
/**
* @copydoc cuvis_shutdown
*/
Expand Down Expand Up @@ -2607,9 +2607,9 @@ namespace cuvis
return std::string(version);
}

inline void General::init(std::string const& settings_path, int global_loglevel)
inline void General::init(std::string const& settings_path, int global_loglevel, std::string logfile_name)
{
chk(cuvis_init(settings_path.c_str(), global_loglevel));
chk(cuvis_init(settings_path.c_str(), global_loglevel, logfile_name.empty() ? NULL : logfile_name.c_str()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
chk(cuvis_init(settings_path.c_str(), global_loglevel, logfile_name.empty() ? NULL : logfile_name.c_str()));
chk(cuvis_init(settings_path.c_str(), global_loglevel, logfile_name.empty() ? nullptr : logfile_name.c_str()));

I think the cleaner c++ way would be using nullptr instead of NULL

return;
}

Expand Down