mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
[es] Change order of methods to fit with style.
This commit is contained in:
parent
cf71223163
commit
4d6eb6f694
|
@ -12,9 +12,9 @@ namespace es
|
|||
SectionHeader_V2();
|
||||
SectionHeader_V2(const SectionHeader_V2& other);
|
||||
|
||||
void operator=(const SectionHeader_V2& other);
|
||||
bool operator==(const SectionHeader_V2& other) const;
|
||||
bool operator!=(const SectionHeader_V2& other) const;
|
||||
void operator=(const SectionHeader_V2& other);
|
||||
|
||||
// export/import binary
|
||||
void toBytes();
|
||||
|
|
|
@ -12,9 +12,9 @@ namespace es
|
|||
TicketBody_V2();
|
||||
TicketBody_V2(const TicketBody_V2& other);
|
||||
|
||||
void operator=(const TicketBody_V2& other);
|
||||
bool operator==(const TicketBody_V2& other) const;
|
||||
bool operator!=(const TicketBody_V2& other) const;
|
||||
void operator=(const TicketBody_V2& other);
|
||||
|
||||
// export/import binary
|
||||
void toBytes();
|
||||
|
|
|
@ -10,20 +10,6 @@ es::SectionHeader_V2::SectionHeader_V2(const SectionHeader_V2 & other)
|
|||
*this = other;
|
||||
}
|
||||
|
||||
bool es::SectionHeader_V2::operator==(const SectionHeader_V2 & other) const
|
||||
{
|
||||
return (mSectionOffset == other.mSectionOffset) \
|
||||
&& (mRecordSize == other.mRecordSize) \
|
||||
&& (mSectionSize == other.mSectionSize) \
|
||||
&& (mRecordNum == other.mRecordNum) \
|
||||
&& (mSectionType == other.mSectionType);
|
||||
}
|
||||
|
||||
bool es::SectionHeader_V2::operator!=(const SectionHeader_V2 & other) const
|
||||
{
|
||||
return !(*this ==other);
|
||||
}
|
||||
|
||||
void es::SectionHeader_V2::operator=(const SectionHeader_V2 & other)
|
||||
{
|
||||
if (other.getBytes().size())
|
||||
|
@ -41,6 +27,20 @@ void es::SectionHeader_V2::operator=(const SectionHeader_V2 & other)
|
|||
}
|
||||
}
|
||||
|
||||
bool es::SectionHeader_V2::operator==(const SectionHeader_V2 & other) const
|
||||
{
|
||||
return (mSectionOffset == other.mSectionOffset) \
|
||||
&& (mRecordSize == other.mRecordSize) \
|
||||
&& (mSectionSize == other.mSectionSize) \
|
||||
&& (mRecordNum == other.mRecordNum) \
|
||||
&& (mSectionType == other.mSectionType);
|
||||
}
|
||||
|
||||
bool es::SectionHeader_V2::operator!=(const SectionHeader_V2 & other) const
|
||||
{
|
||||
return !(*this ==other);
|
||||
}
|
||||
|
||||
void es::SectionHeader_V2::toBytes()
|
||||
{
|
||||
mRawBinary.alloc(sizeof(sSectionHeader_v2));
|
||||
|
|
|
@ -12,32 +12,6 @@ es::TicketBody_V2::TicketBody_V2(const TicketBody_V2 & other)
|
|||
*this = other;
|
||||
}
|
||||
|
||||
bool es::TicketBody_V2::operator==(const TicketBody_V2 & other) const
|
||||
{
|
||||
return (mIssuer == other.mIssuer) \
|
||||
&& (memcmp(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize) == 0) \
|
||||
&& (mEncType == other.mEncType) \
|
||||
&& (mTicketVersion == other.mTicketVersion) \
|
||||
&& (mLicenseType == other.mLicenseType) \
|
||||
&& (mPreInstall == other.mPreInstall) \
|
||||
&& (mSharedTitle == other.mSharedTitle) \
|
||||
&& (mAllowAllContent == other.mAllowAllContent) \
|
||||
&& (memcmp(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize) == 0) \
|
||||
&& (mTicketId == other.mTicketId) \
|
||||
&& (mDeviceId == other.mDeviceId) \
|
||||
&& (memcmp(mRightsId, other.mRightsId, ticket::kRightsIdSize) == 0) \
|
||||
&& (mAccountId == other.mAccountId) \
|
||||
&& (mSectTotalSize == other.mSectTotalSize) \
|
||||
&& (mSectHeaderOffset == other.mSectHeaderOffset) \
|
||||
&& (mSectNum == other.mSectNum) \
|
||||
&& (mSectEntrySize == other.mSectEntrySize);
|
||||
}
|
||||
|
||||
bool es::TicketBody_V2::operator!=(const TicketBody_V2 & other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
void es::TicketBody_V2::operator=(const TicketBody_V2 & other)
|
||||
{
|
||||
if (other.getBytes().size())
|
||||
|
@ -67,6 +41,32 @@ void es::TicketBody_V2::operator=(const TicketBody_V2 & other)
|
|||
}
|
||||
}
|
||||
|
||||
bool es::TicketBody_V2::operator==(const TicketBody_V2 & other) const
|
||||
{
|
||||
return (mIssuer == other.mIssuer) \
|
||||
&& (memcmp(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize) == 0) \
|
||||
&& (mEncType == other.mEncType) \
|
||||
&& (mTicketVersion == other.mTicketVersion) \
|
||||
&& (mLicenseType == other.mLicenseType) \
|
||||
&& (mPreInstall == other.mPreInstall) \
|
||||
&& (mSharedTitle == other.mSharedTitle) \
|
||||
&& (mAllowAllContent == other.mAllowAllContent) \
|
||||
&& (memcmp(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize) == 0) \
|
||||
&& (mTicketId == other.mTicketId) \
|
||||
&& (mDeviceId == other.mDeviceId) \
|
||||
&& (memcmp(mRightsId, other.mRightsId, ticket::kRightsIdSize) == 0) \
|
||||
&& (mAccountId == other.mAccountId) \
|
||||
&& (mSectTotalSize == other.mSectTotalSize) \
|
||||
&& (mSectHeaderOffset == other.mSectHeaderOffset) \
|
||||
&& (mSectNum == other.mSectNum) \
|
||||
&& (mSectEntrySize == other.mSectEntrySize);
|
||||
}
|
||||
|
||||
bool es::TicketBody_V2::operator!=(const TicketBody_V2 & other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
||||
void es::TicketBody_V2::toBytes()
|
||||
{
|
||||
mRawBinary.alloc(sizeof(sTicketBody_v2));
|
||||
|
|
Loading…
Reference in a new issue