fix: update YYCC dependency
- move EnumsHelper into YYCC because it is widely used. - rename all calling to EnumsHelper due to this modification. - add version checker in code to make sure that user use correct YYCC library to compile. - modify some include syntax because the include directory layout changes of YYCC. - update CMake script to resolve the bug that we can not export LibCmo (thanks doyaGu and BLumia).
This commit is contained in:
@ -216,8 +216,8 @@ namespace LibCmo::CK2 {
|
||||
}
|
||||
|
||||
// compress header if needed
|
||||
if (EnumsHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD) ||
|
||||
EnumsHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED)) {
|
||||
if (YYCC::EnumHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD) ||
|
||||
YYCC::EnumHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED)) {
|
||||
|
||||
CKDWORD comp_buf_size = 0;
|
||||
void* comp_buffer = CKPackData(hdrparser->GetBase(), hdrparser->GetSize(), comp_buf_size, m_Ctx->GetCompressionLevel());
|
||||
@ -263,8 +263,8 @@ namespace LibCmo::CK2 {
|
||||
}
|
||||
|
||||
// compress header if needed
|
||||
if (EnumsHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD) ||
|
||||
EnumsHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED)) {
|
||||
if (YYCC::EnumHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_CHUNKCOMPRESSED_OLD) ||
|
||||
YYCC::EnumHelper::Has(fileWriteMode, CK_FILE_WRITEMODE::CKFILE_WHOLECOMPRESSED)) {
|
||||
|
||||
CKDWORD comp_buf_size = 0;
|
||||
void* comp_buffer = CKPackData(datparser->GetBase(), datparser->GetSize(), comp_buf_size, m_Ctx->GetCompressionLevel());
|
||||
|
Reference in New Issue
Block a user