Add Flag support to ChunkFile.h

This commit is contained in:
comex 2014-08-24 19:38:33 -04:00
parent 45a4236283
commit de7294ecc1
1 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include "Common/Common.h" #include "Common/Common.h"
#include "Common/FileUtil.h" #include "Common/FileUtil.h"
#include "Common/Flag.h"
// ewww // ewww
#if _LIBCPP_VERSION #if _LIBCPP_VERSION
@ -165,6 +166,14 @@ public:
Do(x[i]); Do(x[i]);
} }
void Do(Common::Flag& flag)
{
bool s = flag.IsSet();
Do(s);
if (mode == MODE_READ)
flag.Set(s);
}
template <typename T> template <typename T>
void Do(T& x) void Do(T& x)
{ {