be_t<> constructor elimination

This commit is contained in:
Nekotekina 2014-07-18 20:55:26 +04:00
parent a7971b55ee
commit 74914c5916
15 changed files with 81 additions and 103 deletions

View file

@ -113,8 +113,9 @@ int Decrypt(rFile& pkg_f, rFile& dec_pkg_f, PKGHeader* m_header)
{
aes_crypt_ecb(&c, AES_ENCRYPT, iv, ctr+j*HASH_LEN);
be_t<u64> hi = *(be_t<u64>*)&iv[0];
be_t<u64> lo = *(be_t<u64>*)&iv[8] + 1;
be_t<u64> hi = be_t<u64>::MakeFromBE(*(u64*)&iv[0]);
be_t<u64> lo = be_t<u64>::MakeFromBE(*(u64*)&iv[8]);
lo++;
if (lo == 0)
hi += 1;