Fix compile errors

This commit is contained in:
baldurk
2020-08-19 19:18:37 +01:00
parent ffac439cce
commit a48ab556f3
4 changed files with 8 additions and 6 deletions
+3
View File
@@ -1,6 +1,9 @@
#pragma once
#include <algorithm>
#include "apidefs.h"
#include "rdcarray.h"
#include "rdcpair.h"
// this is a container with a key-value interface but no strong ordering guarantee.
// The storage is an array of K,V pairs, which are unsorted below a given threshold. As a result
+4 -1
View File
@@ -37,7 +37,10 @@ struct rdcpair
rdcpair(const A &a, const B &b) : first(a), second(b) {}
rdcpair() = default;
rdcpair(const rdcpair<A, B> &o) = default;
rdcpair(rdcpair<A, B> &&o) : first(std::move(o.first)), second(std::move(o.second)) {}
rdcpair(rdcpair<typename std::decay<A>::type, typename std::decay<B>::type> &&o)
: first(std::move(o.first)), second(std::move(o.second))
{
}
rdcpair(typename std::decay<A>::type &&a, typename std::decay<B>::type &&b)
: first(std::move(a)), second(std::move(b))
{
+1 -1
View File
@@ -333,7 +333,7 @@ public:
typename UnwrapHelper<realtype>::Outer *wrapped =
(typename UnwrapHelper<realtype>::Outer *)record->Resource;
wrapped->real = obj;
wrapped->real = ToTypedHandle(obj).real;
obj = realtype((uint64_t)wrapped);
-4
View File
@@ -52,25 +52,21 @@ struct ConstructorCounter
ConstructorCounter()
{
RDCASSERT(value != -9999);
value = 0;
Atomic::Inc32(&constructor);
}
ConstructorCounter(int v)
{
RDCASSERT(value != -9999);
value = v;
Atomic::Inc32(&valueConstructor);
}
ConstructorCounter(const ConstructorCounter &other)
{
RDCASSERT(value != -9999);
value = other.value;
Atomic::Inc32(&copyConstructor);
}
ConstructorCounter(ConstructorCounter &&other)
{
RDCASSERT(value != -9999);
value = other.value;
other.value = -9999;
Atomic::Inc32(&moveConstructor);