mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Encapsulate DUMP contents in "do { ... } while (0)"
This makes the macro more function-like and easier to read.
This commit is contained in:
parent
2606d94935
commit
a67ca87fd3
@ -35,7 +35,12 @@
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
|
||||
#define DUMP(foo) std::cout << "==========================================\n" #foo ":\n" << collapseJacs(foo) << std::endl
|
||||
#define DUMP(foo) \
|
||||
do { \
|
||||
std::cout << "==========================================\n" \
|
||||
<< #foo ":\n" \
|
||||
<< collapseJacs(foo) << std::endl; \
|
||||
} while (0)
|
||||
|
||||
typedef AutoDiff::ForwardBlock<double> ADB;
|
||||
typedef ADB::V V;
|
||||
|
Loading…
Reference in New Issue
Block a user