Changeset 14693 for trunk/FACT++/src
- Timestamp:
- 11/25/12 13:18:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r14692 r14693 1557 1557 1558 1558 double hrz = NAN; 1559 if (args.Length() <2)1559 if (args.Length()==0 || args[0]->IsNull()) 1560 1560 hrz = LN_SOLAR_STANDART_HORIZON; 1561 if (args.Length() ==2 && args[1]->IsNumber())1562 hrz = args[ 1]->NumberValue();1563 if (args.Length() ==2 && args[1]->IsString())1564 { 1565 string arg(Tools::Trim(*String::AsciiValue(args[ 1])));1561 if (args.Length()>0 && args[0]->IsNumber()) 1562 hrz = args[0]->NumberValue(); 1563 if (args.Length()>0 && args[0]->IsString()) 1564 { 1565 string arg(Tools::Trim(*String::AsciiValue(args[0]))); 1566 1566 transform(arg.begin(), arg.end(), arg.begin(), ::tolower); 1567 1567 … … 1580 1580 1581 1581 const Local<Value> date = 1582 args.Length() ==0 ? Date::New(Time().JavaDate()) : args[0];1582 args.Length()<2 ? Date::New(Time().JavaDate()) : args[1]; 1583 1583 if (date.IsEmpty()) 1584 1584 return Undefined();
Note:
See TracChangeset
for help on using the changeset viewer.