Changeset 9e93790 in tol


Ignore:
Timestamp:
Nov 21, 2011, 10:56:36 AM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
9f6ab11
Parents:
6da87d6
Message:

Refs #1341
Compare.VersionString must handle with both numerical and string tokens

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/text_type/txtgra.cpp

    r6da87d6 r9e93790  
    26882688  for(k=0; (k<n) && !cmp; k++)
    26892689  {
    2690     t1 = atoi(tok1[k].String());
    2691     t2 = atoi(tok2[k].String());
    2692     cmp = t1-t2;
     2690    if(isdigit(tok1[k][0]))
     2691    {
     2692      t1 = atoi(tok1[k].String());
     2693      t2 = atoi(tok2[k].String());
     2694      cmp = t1-t2;
     2695    }
     2696    else
     2697    {
     2698      cmp = strcmp(tok1[k].String(),tok2[k].String());
     2699    } 
    26932700  }
    26942701  if(!cmp) { cmp = n1-n2; }
    … …  
    27112718//--------------------------------------------------------------------
    27122719{
    2713   contens_ = CompareVersionString(&Text(Arg(1)),&Text(Arg(2)));
    2714 }
     2720  const BText& v1 = Text(Arg(1));
     2721  const BText& v2 = Text(Arg(2));
     2722  contens_ = CompareVersionString(&v1,&v2);
     2723}
Note: See TracChangeset for help on using the changeset viewer.