Changeset a3a29a6 in tol


Ignore:
Timestamp:
Feb 26, 2010, 12:00:47 PM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
0e3f1271
Parents:
c9c91f7
Message:

Ensuring GetOperator returns no null

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@2037 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/set_type/setgrainc.cpp

    rc9c91f7 ra3a29a6  
    16591659            {
    16601660              BText expr = Compact(ftxt);
    1661               BDate dte = ConstantDate(expr);
     1661              BDate dte;
     1662              if((expr=="") | (expr=="?") | (expr=="Unknown") | (expr=="UnknownDate"))
     1663              {
     1664                ok = true;
     1665              }
     1666              else
     1667              {
     1668                dte = ConstantDate(expr);
     1669                ok = (dte.HasValue()!=0);
     1670              }
    16621671              fieldValue = new BContensDate("",dte,"");
    1663               ok = dte.HasValue() | (expr=="?") | (expr=="UnknownDate");
    16641672            }
    16651673            else if(gra==GraReal())
    … …  
    16671675              char * pEnd;
    16681676              BText expr = Compact(ftxt);
    1669               double x = strtod(expr.String(),&pEnd);
    1670               if(!pEnd || pEnd[0]) { x = BDat::Nan(); }
     1677              double x = BDat::Nan();
     1678              if((expr=="") | (expr=="?"))
     1679              {
     1680                ok = true;
     1681              }
     1682              else
     1683              {
     1684                x = strtod(expr.String(),&pEnd);
     1685                if(!pEnd || pEnd[0]) { x = BDat::Nan(); }
     1686                ok = !IS_NAN(x);
     1687              }
    16711688              fieldValue = new BContensDat("",x,"");
    1672               ok = !IS_NAN(x) | (expr=="?");
    16731689            }
    16741690            if(!fieldValue)
Note: See TracChangeset for help on using the changeset viewer.