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
This commit is contained in:
parent
685f4327f5
commit
7faa2e784d
5 changed files with 7 additions and 7 deletions
|
|
@ -163,7 +163,7 @@ namespace query {
|
|||
static void
|
||||
createSlot (Table& table)
|
||||
{
|
||||
ClassLock<TableEntry> guard();
|
||||
ClassLock<TableEntry> guard;
|
||||
if (!index)
|
||||
index = ++maxSlots;
|
||||
if (index > table.size())
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ namespace lib {
|
|||
{
|
||||
try
|
||||
{ // avoiding a per-instance lock for now.
|
||||
ClassLock<AllocationCluster> guard(); // (see note in the class description)
|
||||
ClassLock<AllocationCluster> 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<AllocationCluster> guard(); // (see note in the class description)
|
||||
ClassLock<AllocationCluster> guard; // (see note in the class description)
|
||||
|
||||
if (slot > typeHandlers_.size())
|
||||
typeHandlers_.resize(slot);
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ namespace lib {
|
|||
static TypeInfo
|
||||
setup()
|
||||
{
|
||||
ClassLock<AllocationCluster> guard();
|
||||
ClassLock<AllocationCluster> guard;
|
||||
if (!id_)
|
||||
id_= ++maxTypeIDs;
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace lib {
|
|||
static IxID
|
||||
newTypeID (IxID& typeID)
|
||||
{
|
||||
ClassLock<TypedContext> synchronised();
|
||||
ClassLock<TypedContext> synchronised;
|
||||
if (!typeID)
|
||||
typeID = ++lastGeneratedTypeID;
|
||||
return typeID;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace visitor {
|
|||
static void
|
||||
generateID (size_t& id)
|
||||
{
|
||||
ClassLock<Tag> guard();
|
||||
ClassLock<Tag> guard;
|
||||
if (!id)
|
||||
id = ++lastRegisteredID;
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ namespace visitor {
|
|||
void
|
||||
accomodate (size_t index)
|
||||
{
|
||||
ClassLock<Dispatcher> guard(); // note: this lock is also used for the singleton!
|
||||
ClassLock<Dispatcher> guard; // note: this lock is also used for the singleton!
|
||||
if (index > table_.size())
|
||||
table_.resize (index); // performance bottleneck?? TODO: measure the real impact!
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue