Use parentheses for macro arguments
This commit is contained in:
@@ -1273,9 +1273,9 @@ bool Song::MergeFromSimpleMetaBundle(const Engine::SimpleMetaBundle &bundle) {
|
||||
|
||||
void Song::BindToQuery(QSqlQuery *query) const {
|
||||
|
||||
#define strval(x) (x.isNull() ? "" : x)
|
||||
#define intval(x) (x <= 0 ? -1 : x)
|
||||
#define notnullintval(x) (x == -1 ? QVariant() : x)
|
||||
#define strval(x) ((x).isNull() ? "" : (x))
|
||||
#define intval(x) ((x) <= 0 ? -1 : (x))
|
||||
#define notnullintval(x) ((x) == -1 ? QVariant() : (x))
|
||||
|
||||
// Remember to bind these in the same order as kBindSpec
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class MusicBrainzClient : public QObject {
|
||||
|
||||
bool operator<(const Result& other) const {
|
||||
#define cmp(field) \
|
||||
if (field < other.field) return true; \
|
||||
if (field > other.field) return false;
|
||||
if ((field) < other.field) return true; \
|
||||
if ((field) > other.field) return false;
|
||||
|
||||
cmp(track_);
|
||||
cmp(year_);
|
||||
|
||||
Reference in New Issue
Block a user