Skip to content

Commit ce88143

Browse files
committed
config: Tidy and set defaults.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent 9a9c50e commit ce88143

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

include/pfasst.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace pfasst
1111
{
12-
inline static void init(int argc, char** argv, std::function<void()> opts, std::function<void()> logs)
12+
inline static void init(int argc, char** argv, std::function<void()> opts=nullptr, std::function<void()> logs=nullptr)
1313
{
1414
if (opts) {
1515
opts();

include/pfasst/config.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,27 @@ using namespace std;
1515
#include <boost/program_options.hpp>
1616
namespace po = boost::program_options;
1717

18-
#include "logging.hpp"
19-
2018
namespace pfasst
2119
{
2220

2321
namespace config
2422
{
2523
/**
26-
* @note This is using the Singleton Pattern.
27-
* pfasst::options::get_instance() is thread-safe with C++11.
24+
* @note This uses the Singleton Pattern, and hence pfasst::options::get_instance() is
25+
* thread-safe with C++11.
2826
*/
2927
class options
3028
{
3129
public:
32-
//! Maximum width of a line in the help output
3330
static const size_t LINE_WIDTH = 100;
3431

3532
private:
3633
po::options_description all_options;
3734
map<string, po::options_description> option_groups;
38-
3935
po::variables_map variables_map;
4036
vector<string> unrecognized_args;
4137
bool initialized = false;
4238

43-
private:
4439
options() {}
4540
options(const options&) = delete;
4641
void operator=(const options&) = delete;

0 commit comments

Comments
 (0)