Changeset 845
- Timestamp:
- 01/06/19 02:41:09 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/extvalue.cpp
r794 r845 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 8Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2019 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 435 435 else if (src.getType() == TDouble) 436 436 return compareFloat((double)idata(), src.getDouble()); 437 else if ((getInt() == 0) && (src.getType() == TString)) 438 return ResultMismatch_RelaxedUnequal; 437 439 else 438 440 return ResultMismatch;//comparing numbers with other things is invalid … … 449 451 if (src.getType() == TString) 450 452 return compareString(sdata(), src.getString()); 453 else if ((src.type == TInt) && (src.getInt() == 0)) 454 return ResultMismatch_RelaxedUnequal; 451 455 else 452 456 return ResultMismatch; … … 491 495 if (context->v1 && context->v2) 492 496 msg += SString::sprintf(": %s %s %s", 493 context->v1->typeAndValue().c_str(),494 cmp_op_names[op - CmpFIRST],495 context->v2->typeAndValue().c_str());497 context->v1->typeAndValue().c_str(), 498 cmp_op_names[op - CmpFIRST], 499 context->v2->typeAndValue().c_str()); 496 500 } 497 501 logPrintf("ExtValue", "interpretCompare", LOG_ERROR, "%s", msg.c_str()); … … 559 563 } 560 564 } 561 565 //NO break; 562 566 default:; 563 567 } … … 661 665 } 662 666 } 663 667 //NO break; 664 668 default:; 665 669 } … … 813 817 for (const char* t = curr; t < next; t++) 814 818 switch (*t) 815 {819 { 816 820 case 'd': case 'x': case 'X': case 'u': case 'p': case 'c': type = 'd'; t = next; break; 817 821 case 'f': case 'g': case 'e': type = 'f'; t = next; break; … … 819 823 case 't': case 'T': case 'y': case 'i': case 'm': type = *t; t = next; break; 820 824 case '%': if (t > begin) { type = *t; t = next; } break; 821 }825 } 822 826 } 823 827 if (curr > begin) curr--; … … 887 891 } 888 892 } 889 893 break; 890 894 891 895 case TObj: case TUnknown: case TInvalid: … … 1239 1243 if (*end == '>') 1240 1244 { 1241 setError(SString("Unserializable class: ") + SString(in + 1, end - in - 1));1242 return end + 1;1245 setError(SString("Unserializable class: ") + SString(in + 1, end - in - 1)); 1246 return end + 1; 1243 1247 } 1244 1248 else
Note: See TracChangeset
for help on using the changeset viewer.