mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Better names
This commit is contained in:
parent
0691dfef3b
commit
4e654a7e6e
@ -226,9 +226,9 @@ public:
|
||||
template < typename T, typename std::enable_if < std::is_pointer<T>::value, int >::type = 0 >
|
||||
void load(T &data)
|
||||
{
|
||||
ui8 hlp;
|
||||
load( hlp );
|
||||
if(!hlp)
|
||||
bool isNull;
|
||||
load( isNull );
|
||||
if(isNull)
|
||||
{
|
||||
data = nullptr;
|
||||
return;
|
||||
|
@ -174,11 +174,11 @@ public:
|
||||
void save(const T &data)
|
||||
{
|
||||
//write if pointer is not nullptr
|
||||
ui8 hlp = (data!=nullptr);
|
||||
save(hlp);
|
||||
bool isNull = (data == nullptr);
|
||||
save(isNull);
|
||||
|
||||
//if pointer is nullptr then we don't need anything more...
|
||||
if(!hlp)
|
||||
if(data == nullptr)
|
||||
return;
|
||||
|
||||
savePointerImpl(data);
|
||||
|
Loading…
Reference in New Issue
Block a user