From 7faa2e784d677b88c68fbf9f4a64476834dcffe0 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 26 Aug 2014 03:31:03 +0200 Subject: [PATCH] CLang-Compatibility: zero argument ctor now treated as function definition previous versions used to resolve this ambiguity in favour of a ctor call, but now the compiler treats such constructs as function definition; this is reasonable, since C++11 introduced the notion of a "generalised initialisation", which is always written as a (possibly empty) list in braces. In these specific cases here, we just omit the empty parens --- src/common/query/defs-registry.hpp | 2 +- src/lib/allocation-cluster.cpp | 4 ++-- src/lib/allocation-cluster.hpp | 2 +- src/lib/typed-counter.hpp | 2 +- src/lib/visitor-dispatcher.hpp | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/query/defs-registry.hpp b/src/common/query/defs-registry.hpp index c3a7db7be..a4449d328 100644 --- a/src/common/query/defs-registry.hpp +++ b/src/common/query/defs-registry.hpp @@ -163,7 +163,7 @@ namespace query { static void createSlot (Table& table) { - ClassLock guard(); + ClassLock guard; if (!index) index = ++maxSlots; if (index > table.size()) diff --git a/src/lib/allocation-cluster.cpp b/src/lib/allocation-cluster.cpp index 68d75cbca..5baeded2b 100644 --- a/src/lib/allocation-cluster.cpp +++ b/src/lib/allocation-cluster.cpp @@ -190,7 +190,7 @@ namespace lib { { try { // avoiding a per-instance lock for now. - ClassLock guard(); // (see note in the class description) + ClassLock guard; // (see note in the class description) TRACE (memory, "shutting down AllocationCluster"); for (size_t i = typeHandlers_.size(); 0 < i; --i) @@ -229,7 +229,7 @@ namespace lib { ASSERT (0 < slot); { // avoiding a per-instance lock for now. - ClassLock guard(); // (see note in the class description) + ClassLock guard; // (see note in the class description) if (slot > typeHandlers_.size()) typeHandlers_.resize(slot); diff --git a/src/lib/allocation-cluster.hpp b/src/lib/allocation-cluster.hpp index ab013ecfa..e9185ba70 100644 --- a/src/lib/allocation-cluster.hpp +++ b/src/lib/allocation-cluster.hpp @@ -254,7 +254,7 @@ namespace lib { static TypeInfo setup() { - ClassLock guard(); + ClassLock guard; if (!id_) id_= ++maxTypeIDs; diff --git a/src/lib/typed-counter.hpp b/src/lib/typed-counter.hpp index 82ee099bb..996896bcf 100644 --- a/src/lib/typed-counter.hpp +++ b/src/lib/typed-counter.hpp @@ -88,7 +88,7 @@ namespace lib { static IxID newTypeID (IxID& typeID) { - ClassLock synchronised(); + ClassLock synchronised; if (!typeID) typeID = ++lastGeneratedTypeID; return typeID; diff --git a/src/lib/visitor-dispatcher.hpp b/src/lib/visitor-dispatcher.hpp index 32501d015..d3aa22690 100644 --- a/src/lib/visitor-dispatcher.hpp +++ b/src/lib/visitor-dispatcher.hpp @@ -64,7 +64,7 @@ namespace visitor { static void generateID (size_t& id) { - ClassLock guard(); + ClassLock guard; if (!id) id = ++lastRegisteredID; } @@ -142,7 +142,7 @@ namespace visitor { void accomodate (size_t index) { - ClassLock guard(); // note: this lock is also used for the singleton! + ClassLock guard; // note: this lock is also used for the singleton! if (index > table_.size()) table_.resize (index); // performance bottleneck?? TODO: measure the real impact! }