From d5ad23bad45a093dd0f296eba8bb43bf47462f42 Mon Sep 17 00:00:00 2001 From: Nabil Hachicha Date: Sat, 30 Jan 2016 18:26:27 +0000 Subject: [PATCH] fixes #209 download core in gradle task --- parser/query_builder.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/parser/query_builder.cpp b/parser/query_builder.cpp index 7a6b179a..847850fa 100644 --- a/parser/query_builder.cpp +++ b/parser/query_builder.cpp @@ -46,22 +46,24 @@ T stot(const std::string s) { #define precondition(condition, message) if (!__builtin_expect(condition, 1)) { throw std::runtime_error(message); } // FIXME: TrueExpression and FalseExpression should be supported by core in some way -struct TrueExpression : realm::Expression { - size_t find_first(size_t start, size_t end) const override +class TrueExpression : public realm::Expression { + public: + virtual size_t find_first(size_t start, size_t end) const { if (start != end) return start; return not_found; } - void set_table() override {} - const Table* get_table() const override { return nullptr; } + virtual void set_table(const Table* table) {} + virtual const Table* get_table() const { return nullptr; } }; -struct FalseExpression : realm::Expression { - size_t find_first(size_t, size_t) const override { return not_found; } - void set_table() override {} - const Table* get_table() const override { return nullptr; } +class FalseExpression : public realm::Expression { + public: + virtual size_t find_first(size_t, size_t) const { return not_found; } + virtual void set_table(const Table* table) {} + virtual const Table* get_table() const { return nullptr; } }; using KeyPath = std::vector;