mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
use exceptions in FML
This commit is contained in:
@@ -86,10 +86,15 @@ inline std::ostream& operator<<(std::ostream& out, const TPoint<T>& point)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void operator>>(const FML::Node& node, TPoint<T>& point)
|
||||
inline bool operator>>(const FML::Node& node, TPoint<T>& point)
|
||||
{
|
||||
*node.at(0) >> point.x;
|
||||
*node.at(1) >> point.y;
|
||||
T x, y;
|
||||
if(node.readAt(0, &x) && node.readAt(1, &y)) {
|
||||
point.x = x;
|
||||
point.y = y;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user