preprocessor now filters debug output
This commit is contained in:
@@ -9,14 +9,18 @@ std::shared_ptr<DriftVelocity> buildDriftVelocity(
|
||||
const json_path& path_to_drift_velocity) {
|
||||
if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"VectorField"}))) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating drift velocity: Vector field.");
|
||||
#endif
|
||||
std::shared_ptr<VectorField> field =
|
||||
buildVectorField(parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"VectorField"})));
|
||||
return std::shared_ptr<DriftVelocity>(new DriftVelocity(field));
|
||||
} else if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"null"}))) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating drift velocity: null.");
|
||||
#endif
|
||||
return nullptr;
|
||||
} else {
|
||||
ERROR("No drift velocity given.");
|
||||
@@ -29,14 +33,18 @@ std::shared_ptr<DriftVelocity> buildDriftVelocityIncludingRedirection(
|
||||
std::stringstream cpath;
|
||||
if (parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"CreateSameAs"}))) {
|
||||
#ifdef debug_level2
|
||||
DEBUG_LEVEL_2("Creating drift velocity: CreateSameAs.");
|
||||
#endif
|
||||
json_path path_to_same = json_path_get(parameter.jsonObjectFromBase(
|
||||
json_path_append(path_to_drift_velocity, {"CreateSameAs"})));
|
||||
#ifdef debug_level3
|
||||
std::stringstream path;
|
||||
for (auto& p : path_to_same) {
|
||||
path << p << " ";
|
||||
}
|
||||
DEBUG_LEVEL_3("From path: " + path.str());
|
||||
#endif
|
||||
return buildDriftVelocityIncludingRedirection(parameter, path_to_same);
|
||||
} else {
|
||||
return buildDriftVelocity(parameter, path_to_drift_velocity);
|
||||
|
||||
Reference in New Issue
Block a user