mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix clang warnings
This commit is contained in:
parent
d5c3b08ce1
commit
7a204258ba
1 changed files with 20 additions and 5 deletions
|
@ -34,9 +34,9 @@
|
|||
|
||||
#include <villas/config.h>
|
||||
|
||||
#ifdef LIBCONFIG_FOUND
|
||||
#include <libconfig.h>
|
||||
#endif /* LIBCONFIG_FOUND */
|
||||
#ifdef WITH_CONFIG
|
||||
#include <libconfig.h>
|
||||
#endif /* WITH_CONFIG */
|
||||
|
||||
namespace villas {
|
||||
|
||||
|
@ -99,14 +99,29 @@ protected:
|
|||
|
||||
public:
|
||||
template<typename... Args>
|
||||
ConfigError(json_t *s, const std::string &i, const std::string &what = "Failed to parse configuration", Args&&... args) :
|
||||
ConfigError(json_t *s, const std::string &i, const std::string &what = "Failed to parse configuration") :
|
||||
std::runtime_error(what),
|
||||
id(i),
|
||||
setting(s)
|
||||
{ }
|
||||
|
||||
template<typename... Args>
|
||||
ConfigError(json_t *s, const std::string &i, const std::string &what, Args&&... args) :
|
||||
std::runtime_error(fmt::format(what, std::forward<Args>(args)...)),
|
||||
id(i),
|
||||
setting(s)
|
||||
{ }
|
||||
|
||||
template<typename... Args>
|
||||
ConfigError(json_t *s, const json_error_t &e, const std::string &i, const std::string &what = "Failed to parse configuration", Args&&... args) :
|
||||
ConfigError(json_t *s, const json_error_t &e, const std::string &i, const std::string &what = "Failed to parse configuration") :
|
||||
std::runtime_error(what),
|
||||
id(i),
|
||||
setting(s),
|
||||
error(e)
|
||||
{ }
|
||||
|
||||
template<typename... Args>
|
||||
ConfigError(json_t *s, const json_error_t &e, const std::string &i, const std::string &what, Args&&... args) :
|
||||
std::runtime_error(fmt::format(what, std::forward<Args>(args)...)),
|
||||
id(i),
|
||||
setting(s),
|
||||
|
|
Loading…
Add table
Reference in a new issue