Fix compilation with GCC 4.9
4.9 does not correctly implement C++14 aggregate initialization.
This commit is contained in:
parent
99037a7c72
commit
143cc3b696
|
@ -30,11 +30,11 @@ CachedRealm::CachedRealm(const std::shared_ptr<Realm>& realm, bool cache)
|
||||||
{
|
{
|
||||||
struct RefCountedWeakPointer {
|
struct RefCountedWeakPointer {
|
||||||
std::weak_ptr<Realm> realm;
|
std::weak_ptr<Realm> realm;
|
||||||
std::atomic<size_t> ref_count = {1};
|
std::atomic<size_t> ref_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
CFRunLoopSourceContext ctx{};
|
CFRunLoopSourceContext ctx{};
|
||||||
ctx.info = new RefCountedWeakPointer{realm};
|
ctx.info = new RefCountedWeakPointer{realm, {1}};
|
||||||
ctx.perform = [](void* info) {
|
ctx.perform = [](void* info) {
|
||||||
if (auto realm = static_cast<RefCountedWeakPointer*>(info)->realm.lock()) {
|
if (auto realm = static_cast<RefCountedWeakPointer*>(info)->realm.lock()) {
|
||||||
realm->notify();
|
realm->notify();
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Schema;
|
||||||
namespace parser {
|
namespace parser {
|
||||||
struct Expression
|
struct Expression
|
||||||
{
|
{
|
||||||
enum class Type { None, Number, String, KeyPath, Argument, True, False } type = Type::None;
|
enum class Type { None, Number, String, KeyPath, Argument, True, False } type;
|
||||||
std::string s;
|
std::string s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ struct Predicate
|
||||||
struct Comparison
|
struct Comparison
|
||||||
{
|
{
|
||||||
Operator op = Operator::None;
|
Operator op = Operator::None;
|
||||||
Expression expr[2];
|
Expression expr[2] = {{Expression::Type::None, ""}, {Expression::Type::None, ""}};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Compound
|
struct Compound
|
||||||
|
|
Loading…
Reference in New Issue