Core: Fixed to compile with GCC

git-svn-id: svn://ultimatepp.org/upp/trunk@10920 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-03-08 08:34:29 +00:00
parent 8ac84c7cc7
commit a1d6e2c70f

View file

@ -500,21 +500,21 @@ ConvertString::~ConvertString() {}
Value ConvertString::Scan(const Value& text) const {
if(IsError(text)) return text;
if(text.GetType() == STRING_V) {
String s = ~text;
String s = text;
if(trimleft)
s = Upp::TrimLeft(s);
if(trimright)
s = Upp::TrimRight(s);
if(IsNull(s)) return notnull ? NotNullError() : String();
if(IsNull(s)) return notnull ? NotNullError() : Value(s);
if(s.GetLength() <= maxlen) return s;
}
if(text.GetType() == WSTRING_V) {
WString s = ~text;
WString s = text;
if(trimleft)
s = Upp::TrimLeft(s);
if(trimright)
s = Upp::TrimRight(s);
if(IsNull(s)) return notnull ? NotNullError() : String();
if(IsNull(s)) return notnull ? NotNullError() : Value(s);
if(s.GetLength() <= maxlen) return s;
}
return ErrorValue(UPP::Format(t_("Please enter no more than %d characters."), maxlen));