Linux: Always use libpng from system (#381)

* Always use system libpng on Linux
* Remove dependency on boost-crc in DSU (reuse existing implementation)
This commit is contained in:
Exzap 2022-10-17 13:25:49 +02:00 committed by GitHub
parent 753040f73a
commit 665a34e518
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 15 deletions

View file

@ -1,6 +1,5 @@
#include "input/api/DSU/DSUMessages.h"
#include <boost/crc.hpp>
#include "util/crypto/crc32.h"
constexpr uint32_t kMagicClient = 'CUSD';
constexpr uint32_t kMagicServer = 'SUSD';
@ -17,15 +16,7 @@ void MessageHeader::Finalize(size_t size)
uint32_t MessageHeader::CRC32(size_t size) const
{
const auto tmp = m_crc32;
m_crc32 = 0;
boost::crc_32_type crc;
crc.process_bytes(this, size);
const auto result = crc.checksum();
m_crc32 = tmp;
return result;
return crc32_calc(this, size);
}
bool MessageHeader::IsClientMessage() const { return m_magic == kMagicClient; }