Changeset 335 for cpp/frams


Ignore:
Timestamp:
03/01/15 01:43:09 (7 years ago)
Author:
Maciej Komosinski
Message:

Cosmetic edits

Location:
cpp/frams
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/extvalue.cpp

    r333 r335  
    384384int ExtValue::interpretCompare(CmpOperator op,CompareResult result,CmpContext *context)
    385385{
    386 int err=ResultUnequal_RelaxedEqual;//error when ResultUnequal_RelaxedEqual or higher (not comparable)
     386CompareResult error_threshold=ResultUnequal_RelaxedEqual;//error when ResultUnequal_RelaxedEqual or higher (not comparable)
    387387int ret=0;
    388388switch (op)
    389389        {
    390         case CmpEQ: ret=(result==ResultEqual)||(result==ResultEqualUnordered); err=ResultMismatch_RelaxedUnequal; break;
    391         case CmpNE: ret=!((result==ResultEqual)||(result==ResultEqualUnordered)); err=ResultMismatch_RelaxedUnequal; break;
    392         case CmpGT: ret=(result==ResultHigher); err=ResultEqualUnordered; break;
    393         case CmpGE: ret=(result==ResultEqual)||(result==ResultHigher); err=ResultEqualUnordered; break;
    394         case CmpLT: ret=(result==ResultLower); err=ResultEqualUnordered; break;
    395         case CmpLE: ret=(result==ResultEqual)||(result==ResultLower); err=ResultEqualUnordered; break;
    396         case CmpREQ: ret=(result==ResultEqual)||(result==ResultEqualUnordered)||(result==ResultUnequal_RelaxedEqual); err=ResultMismatch; break;
    397         case CmpRNE: ret=!((result==ResultEqual)||(result==ResultEqualUnordered)||(result==ResultUnequal_RelaxedEqual)); err=ResultMismatch; break;
     390        case CmpEQ: ret=(result==ResultEqual)||(result==ResultEqualUnordered); error_threshold=ResultMismatch_RelaxedUnequal; break;
     391        case CmpNE: ret=!((result==ResultEqual)||(result==ResultEqualUnordered)); error_threshold=ResultMismatch_RelaxedUnequal; break;
     392        case CmpGT: ret=(result==ResultHigher); error_threshold=ResultEqualUnordered; break;
     393        case CmpGE: ret=(result==ResultEqual)||(result==ResultHigher); error_threshold=ResultEqualUnordered; break;
     394        case CmpLT: ret=(result==ResultLower); error_threshold=ResultEqualUnordered; break;
     395        case CmpLE: ret=(result==ResultEqual)||(result==ResultLower); error_threshold=ResultEqualUnordered; break;
     396        case CmpREQ: ret=(result==ResultEqual)||(result==ResultEqualUnordered)||(result==ResultUnequal_RelaxedEqual); error_threshold=ResultMismatch; break;
     397        case CmpRNE: ret=!((result==ResultEqual)||(result==ResultEqualUnordered)||(result==ResultUnequal_RelaxedEqual)); error_threshold=ResultMismatch; break;
    398398        default:;
    399399        }
    400 if (result>=err)
     400if (result >= error_threshold)
    401401        {
    402402        if (context)
    403403                {
    404                 SString msg="Type mismatch";
     404                SString msg="Type mismatch while comparing";
    405405                if (context->v1 && context->v2)
    406406                        {
  • cpp/frams/vm/framscript.l

    r332 r335  
    11%{
    2 // This file is a part of the Framsticks GDK.
    3 // Copyright (C) 2002-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
     2// This file is a part of the Framsticks SDK.
     3// Copyright (C) 2002-2015  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
    44// Refer to http://www.framsticks.com/ for further information.
    55
Note: See TracChangeset for help on using the changeset viewer.