mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Possible fix for selection of incorrect method for serialization of vector<bool>
This commit is contained in:
parent
e13f98e38e
commit
a1cca251ec
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user