From d21e4dacf7341b924fa534523ba31348ff6789ad Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 15 Aug 2012 21:24:11 +0000 Subject: Compiles on Android! Added Eclipse project, import it into your workspace and it should be runnable on Android! Disabled Squirrel for Android cLog now logs to Android LogCat as well Fixed Lua so it compiles on Android Removed/commented out exceptions in JsonCpp so it compiles on Android git-svn-id: http://mc-server.googlecode.com/svn/trunk@741 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- jsoncpp-src-0.5.0/src/lib_json/json_value.cpp | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'jsoncpp-src-0.5.0/src/lib_json/json_value.cpp') diff --git a/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp b/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp index 573205f13..89271cd00 100644 --- a/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp +++ b/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp @@ -153,7 +153,8 @@ Value::CommentInfo::setComment( const char *text ) if ( comment_ ) valueAllocator()->releaseStringValue( comment_ ); JSON_ASSERT( text ); - JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /"); + //JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /"); + JSON_ASSERT( text[0]=='\0' || text[0]=='/' ); // It seems that /**/ style comments are acceptable as well. comment_ = valueAllocator()->duplicateStringValue( text ); } @@ -697,7 +698,8 @@ Value::asString() const case realValue: case arrayValue: case objectValue: - JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" ); + //JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" ); + JSON_ASSERT( false ); default: JSON_ASSERT_UNREACHABLE; } @@ -722,17 +724,20 @@ Value::asInt() const case intValue: return value_.int_; case uintValue: - JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" ); + //JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" ); + JSON_ASSERT( value_.uint_ < (unsigned)maxInt ); return value_.uint_; case realValue: - JSON_ASSERT_MESSAGE( value_.real_ >= minInt && value_.real_ <= maxInt, "Real out of signed integer range" ); + //JSON_ASSERT_MESSAGE( value_.real_ >= minInt && value_.real_ <= maxInt, "Real out of signed integer range" ); + JSON_ASSERT( value_.real_ >= minInt && value_.real_ <= maxInt ); return Int( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: - JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" ); + //JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" ); + JSON_ASSERT( false ); default: JSON_ASSERT_UNREACHABLE; } @@ -747,19 +752,22 @@ Value::asUInt() const case nullValue: return 0; case intValue: - JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" ); + //JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" ); + JSON_ASSERT( value_.int_ >= 0 ); return value_.int_; case uintValue: return value_.uint_; case realValue: - JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt, "Real out of unsigned integer range" ); + //JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt, "Real out of unsigned integer range" ); + JSON_ASSERT( value_.real_ >= 0 && value_.real_ <= maxUInt ); return UInt( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: - JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" ); + //JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" ); + JSON_ASSERT( false ); default: JSON_ASSERT_UNREACHABLE; } @@ -784,7 +792,8 @@ Value::asDouble() const case stringValue: case arrayValue: case objectValue: - JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" ); + //JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" ); + JSON_ASSERT( false ); default: JSON_ASSERT_UNREACHABLE; } -- cgit v1.2.3