Core: IsVoid(String)

This commit is contained in:
Mirek Fidler 2022-05-19 00:23:26 +02:00
parent c4670a5ada
commit 73e6667a7e
2 changed files with 4 additions and 1 deletions

View file

@ -617,6 +617,9 @@ inline String& operator<<(String&& s, const char& x)
template<>
inline bool IsNull(const String& s) { return s.IsEmpty(); }
inline
bool IsVoid(const String& s) { return s.IsVoid(); }
template<>
inline String AsString(const String& s) { return s; }

View file

@ -451,7 +451,7 @@ void IconDes::SaveUndo()
return;
Slot& c = Current();
Vector<ImageIml> undo = UnpackImlData(c.undo);
int maxn = minmax((single_mode ? 4000000 : 400000) / max((int)tc.image.GetLength(), 1), 4, 128);
int maxn = minmax((single_mode ? 4000000 : 400000) / max((int)c.image.GetLength(), 1), 4, 128);
while(undo.GetCount() > maxn)
undo.Remove(0);
if(undo.GetCount() && undo.Top().image == c.image)