mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Possible fix for selection of incorrect method for serialization of vector<bool>
This commit is contained in:
@@ -235,8 +235,8 @@ public:
|
||||
range::copy(convData, data.begin());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void load(std::vector<T> &data, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0)
|
||||
template <typename T, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0>
|
||||
void load(std::vector<T> &data)
|
||||
{
|
||||
READ_CHECK_U32(length);
|
||||
data.resize(length);
|
||||
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
T *internalPtr = data.get();
|
||||
save(internalPtr);
|
||||
}
|
||||
template <typename T>
|
||||
template <typename T, typename std::enable_if < !std::is_same<T, bool >::value, int >::type = 0>
|
||||
void save(const std::vector<T> &data)
|
||||
{
|
||||
ui32 length = data.size();
|
||||
|
||||
Reference in New Issue
Block a user