rebase from master

This commit is contained in:
Ari Lazier 2016-01-05 19:33:56 -08:00
parent 98cb634a36
commit e90d2c514b
8 changed files with 12 additions and 20 deletions

View File

@ -37,9 +37,9 @@ LOCAL_C_INCLUDES += src/object-store
LOCAL_C_INCLUDES += src/object-store/parser
LOCAL_C_INCLUDES += vendor
LOCAL_C_INCLUDES += vendor/PEGTL
LOCAL_C_INCLUDES += ../../../../../../../react-native/ReactAndroid/src/main/jni/react
LOCAL_C_INCLUDES += ../../../../../../../react-native/ReactAndroid/src/main/jni/first-party
LOCAL_C_INCLUDES += ../../../../../../../react-native/ReactAndroid/src/main/jni/first-party/fb/include
LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/react
LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/first-party
LOCAL_C_INCLUDES += react-native/ReactAndroid/src/main/jni/first-party/fb/include
LOCAL_C_INCLUDES += $(JAVA_HOME)/include
LOCAL_C_INCLUDES += $(JAVA_HOME)/include/darwin
LOCAL_C_INCLUDES += core/include

View File

@ -0,0 +1 @@
../../../../../../../../react-native

View File

@ -63,7 +63,7 @@ JSObjectRef RJSObjectCreate(JSContextRef ctx, Object object) {
return jsObject;
}
extern JSObjectRef RJSDictForPropertyArray(JSContextRef ctx, ObjectSchema &object_schema, JSObjectRef array);
extern JSObjectRef RJSDictForPropertyArray(JSContextRef ctx, const ObjectSchema &object_schema, JSObjectRef array);
namespace realm {

View File

@ -20,9 +20,3 @@ void RJSSetDefaultPath(std::string path);
std::map<std::string, realm::ObjectDefaults> &RJSDefaults(realm::Realm *realm);
std::map<std::string, JSValueRef> &RJSPrototypes(realm::Realm *realm);
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}

View File

@ -306,8 +306,6 @@ public:
bool set_link(size_t col, size_t row, size_t, size_t) { return mark_dirty(row, col); }
bool set_null(size_t col, size_t row) { return mark_dirty(row, col); }
bool nullify_link(size_t col, size_t row, size_t) { return mark_dirty(row, col); }
bool set_int_unique(size_t col, size_t row, int_fast64_t) { return mark_dirty(row, col); }
bool set_string_unique(size_t col, size_t row, StringData) { return mark_dirty(row, col); }
// Doesn't change any data
bool optimize_table() { return true; }

View File

@ -227,7 +227,7 @@ template<> struct action< or_op >
template<> struct action< rule > { \
static void apply( const input & in, ParserState & state ) { \
DEBUG_PRINT_TOKEN(in.string()); \
state.add_expression(Expression{type, in.string()}); }};
state.add_expression(Expression(type, in.string())); }};
EXPRESSION_ACTION(dq_string_content, Expression::Type::String)
EXPRESSION_ACTION(sq_string_content, Expression::Type::String)

View File

@ -30,6 +30,7 @@ struct Expression
{
enum class Type { None, Number, String, KeyPath, Argument, True, False } type = Type::None;
std::string s;
Expression(Type t = Type::None, std::string s = "") : type(t), s(s) {}
};
struct Predicate

View File

@ -67,13 +67,11 @@ class ArgumentConverter : public Arguments
std::vector<ValueType> m_arguments;
ContextType m_ctx;
ValueType &argument_at(size_t index) {
if (index >= m_arguments.size()) {
throw std::out_of_range((std::string)"Argument index " + to_string(index) + " out of range 0.." + to_string(m_arguments.size()-1));
}
return m_arguments[index];
}
};
ValueType &argument_at(size_t index) {
if (index >= m_arguments.size()) {
throw std::out_of_range((std::string)"Argument index " + to_string(index) + " out of range 0.." + to_string(m_arguments.size()-1));
}
return m_arguments[index];
}
};
}