diff --git a/client/snapper/GlobalOptions.h b/client/snapper/GlobalOptions.h index 4b4c3e33..a1e16046 100644 --- a/client/snapper/GlobalOptions.h +++ b/client/snapper/GlobalOptions.h @@ -56,10 +56,10 @@ namespace snapper Style table_style() const { return _table_style; } bool abbreviate() const { return _abbreviate; } OutputFormat output_format() const { return _output_format; } - string separator() const { return _separator; } + const string& separator() const { return _separator; } bool headers() const { return _headers; } - string config() const { return _config; } - string root() const { return _root; } + const string& config() const { return _config; } + const string& root() const { return _root; } Ambit ambit() const { return _ambit; } void set_ambit(Ambit ambit) { _ambit = ambit; } diff --git a/client/snbk/GlobalOptions.h b/client/snbk/GlobalOptions.h index b57a6235..6147c268 100644 --- a/client/snbk/GlobalOptions.h +++ b/client/snbk/GlobalOptions.h @@ -50,7 +50,7 @@ namespace snapper bool quiet() const { return _quiet; } bool verbose() const { return _verbose; } bool debug() const { return _debug; } - boost::optional target_mode() { return _target_mode; } + const boost::optional& target_mode() { return _target_mode; } bool automatic() const { return _automatic; } bool utc() const { return _utc; } bool iso() const { return _iso; } @@ -59,9 +59,9 @@ namespace snapper bool help() const { return _help; } Style table_style() const { return _table_style; } OutputFormat output_format() const { return _output_format; } - string separator() const { return _separator; } + const string& separator() const { return _separator; } bool headers() const { return _headers; } - boost::optional backup_config() const { return _backup_config; } + const boost::optional& backup_config() const { return _backup_config; } private: