Skip to content

Commit

Permalink
Fix compilation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed May 9, 2017
1 parent 515d43b commit ebf1d60
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/vibe/utils/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ struct ArraySet(Key)
}
alias AllocatorType = AffixAllocator!(AW, int);
} else {
alias AW = IAllocator;
IAllocator AW(IAllocator a) { return a; }
alias AllocatorType = AffixAllocator!(IAllocator, int);
}
Key[4] m_staticEntries;
Expand All @@ -592,6 +592,8 @@ struct ArraySet(Key)

~this()
@trusted {
static if (__VERSION__ <= 2071)
scope (failure) assert(false);
if (m_entries.ptr) {
if (--allocator.prefix(m_entries) <= 0) {
try allocator.dispose(m_entries);
Expand All @@ -602,13 +604,17 @@ struct ArraySet(Key)

this(this)
@trusted {
static if (__VERSION__ <= 2071)
scope (failure) assert(false);
if (m_entries.ptr) {
allocator.prefix(m_entries)++;
}
}

@property ArraySet dup()
{
static if (__VERSION__ <= 2071)
scope (failure) assert(false);
ArraySet ret;
ret.m_staticEntries = m_staticEntries;
ret.m_allocator = m_allocator;
Expand Down

0 comments on commit ebf1d60

Please sign in to comment.