Skip to content

Commit

Permalink
Disable some tidy things in Configurable
Browse files Browse the repository at this point in the history
Summary: As title.

Reviewed By: wsanville

Differential Revision: D65774065

fbshipit-source-id: a6877895be0cd5061023a829394fd3c9e862b51b
  • Loading branch information
agampe authored and facebook-github-bot committed Nov 15, 2024
1 parent aa8f4b6 commit 1b19aa1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libredex/Configurable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ Json::Value Configurable::as<Json::Value>(const Json::Value& value,
return value;
}

// NOLINTBEGIN(bugprone-macro-parentheses)
#define IMPLEMENT_REFLECTOR(type) \
template <> \
void Configurable::reflect( \
Expand Down Expand Up @@ -540,6 +541,7 @@ Json::Value Configurable::as<Json::Value>(const Json::Value& value,
const std::string& name, type value) { \
reflector_trait(name, Json::Value(value)); \
}
// NOLINTEND(bugprone-macro-parentheses)

IMPLEMENT_REFLECTOR(float)
IMPLEMENT_REFLECTOR_WITH_DFLT_VALUE(bool)
Expand Down
3 changes: 2 additions & 1 deletion libredex/Configurable.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class Configurable {
Json::Value value;
};

public:
virtual ~Configurable() {}

/**
Expand Down Expand Up @@ -399,6 +398,7 @@ class Configurable {

// Specializations for primitives

// NOLINTBEGIN(bugprone-macro-parentheses)
#define DEFINE_CONFIGURABLE_PRIMITIVE(T) \
template <> \
T Configurable::as<T>(const Json::Value& value, bindflags_t bindflags); \
Expand All @@ -408,6 +408,7 @@ class Configurable {
const std::string& param_doc, const bool param_is_required, \
const Configurable::bindflags_t param_bindflags, T& param, \
typename DefaultValueType<T>::type default_value);
// NOLINTEND(bugprone-macro-parentheses)

#define SINGLE_ARG(...) __VA_ARGS__
DEFINE_CONFIGURABLE_PRIMITIVE(float)
Expand Down

0 comments on commit 1b19aa1

Please sign in to comment.