mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CheckedSerialize now public, fix in type mismatch throw in Value
git-svn-id: svn://ultimatepp.org/upp/trunk@10133 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a208180883
commit
8163afbfae
2 changed files with 5 additions and 5 deletions
|
|
@ -404,6 +404,8 @@ public:
|
|||
|
||||
// ------------------- Advanced streaming --------------------
|
||||
|
||||
void CheckedSerialize(const Callback1<Stream&> serialize, Stream& stream, int version = Null);
|
||||
|
||||
bool Load(Callback1<Stream&> serialize, Stream& stream, int version = Null);
|
||||
bool Store(Callback1<Stream&> serialize, Stream& stream, int version = Null);
|
||||
bool LoadFromFile(Callback1<Stream&> serialize, const char *file = NULL, int version = Null);
|
||||
|
|
|
|||
|
|
@ -244,11 +244,9 @@ inline const T& Value::To() const
|
|||
if(x)
|
||||
return x->Get();
|
||||
}
|
||||
else {
|
||||
ASSERT(t < 255);
|
||||
if(Is((byte)t))
|
||||
return GetSmallRaw<T>();
|
||||
}
|
||||
else
|
||||
if(t < 255 && Is((byte)t))
|
||||
return GetSmallRaw<T>();
|
||||
throw ValueTypeError(String().Cat() << "Invalid value conversion: "
|
||||
<< GetName() << " -> " << typeid(T).name(),
|
||||
*this, t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue