1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Better names

This commit is contained in:
Ivan Savenko 2023-11-07 17:29:57 +02:00
parent 0691dfef3b
commit 4e654a7e6e
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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);