mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-17 18:12:04 +01:00
*** empty log message ***
This commit is contained in:
parent
46caaa0456
commit
703518eba9
2 changed files with 7 additions and 3 deletions
|
@ -272,6 +272,8 @@ inline bool isInfinity(double value) { return (value == Infinity); }
|
|||
inline bool isNegativeInfinity(double value) { return (value == Negative_Infinity); }
|
||||
inline bool isInfinite(double value) { return isInfinity(value) || isNegativeInfinity(value); }
|
||||
|
||||
namespace impl
|
||||
{
|
||||
inline double roundNumber(double value)
|
||||
{
|
||||
if(!(isNaN(value) || isInfinite(value) || (std::fabs(value) == 0)))
|
||||
|
@ -332,6 +334,8 @@ string_type nodeStringValue(const DOM::Node<string_type>& node)
|
|||
} // switch
|
||||
} // nodeStringValue
|
||||
|
||||
} // namespace impl
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
virtual bool asBool() const { return !value_.empty(); }
|
||||
virtual double asNumber() const
|
||||
{
|
||||
return stringAsNumber(value_);
|
||||
return impl::stringAsNumber(value_);
|
||||
} // asNumber
|
||||
virtual string_type asString() const { return value_; }
|
||||
virtual const NodeSet<string_type>& asNodeSet() const { static NodeSet<string_type> empty; return empty; }
|
||||
|
@ -138,11 +138,11 @@ public:
|
|||
} // asBool
|
||||
virtual double asNumber() const
|
||||
{
|
||||
return stringAsNumber(asString());
|
||||
return impl::stringAsNumber(asString());
|
||||
} // asNumber
|
||||
virtual string_type asString() const
|
||||
{
|
||||
return !set_.empty() ? nodeStringValue(set_.top()) : string_adaptor().makeStringT("");
|
||||
return !set_.empty() ? impl::nodeStringValue(set_.top()) : string_adaptor().makeStringT("");
|
||||
} // asStringx
|
||||
virtual const NodeSet<string_type>& asNodeSet() const { return set_; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue