--- parser3/src/classes/double.C 2002/09/18 08:52:47 1.51 +++ parser3/src/classes/double.C 2003/01/21 15:51:06 1.53 @@ -1,11 +1,11 @@ /** @file Parser: @b double parser class. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_DOUBLE_C="$Date: 2002/09/18 08:52:47 $"; +static const char* IDENT_DOUBLE_C="$Date: 2003/01/21 15:51:06 $"; #include "classes.h" #include "pa_request.h" @@ -29,8 +29,9 @@ public: // Methoded static void _int(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value *default_code=params->size()>0? - default_code=¶ms->as_junction(0, "default must be int"):0; // (default) + // just checking (default) syntax validity, never really using it here, just for string.int compatibility + if(params->size()>0) + params->as_junction(0, "default must be int"); VDouble *vdouble=static_cast(r.get_self()); Value& result=*new(pool) VInt(pool, vdouble->as_int()); @@ -39,8 +40,9 @@ static void _int(Request& r, const Strin static void _double(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value *default_code=params->size()>0? - default_code=¶ms->as_junction(0, "default must be double"):0; // (default) + // just checking (default) syntax validity, never really using it here, just for string.doube compatibility + if(params->size()>0) + params->as_junction(0, "default must be double"); VDouble *vdouble=static_cast(r.get_self()); Value& result=*new(pool) VDouble(pool, vdouble->as_double());