fix build failure

This commit is contained in:
tildearrow 2025-04-07 20:44:25 -05:00
parent 914ba11e3b
commit 584305f1fa

View file

@ -678,8 +678,7 @@ struct BlockMatch {
#define MIN_MATCH_SIZE 16 #define MIN_MATCH_SIZE 16
// TODO: // TODO:
// - check whether a block consists only of calls // - see if we can optimize even more
// - see if we can optimize better
SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlocks, unsigned char* speedDial) { SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlocks, unsigned char* speedDial) {
unsigned char* buf=stream->getFinalBuf(); unsigned char* buf=stream->getFinalBuf();
size_t matchSize=MIN_MATCH_SIZE; size_t matchSize=MIN_MATCH_SIZE;
@ -709,7 +708,6 @@ SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlock
// search for bigger matches // search for bigger matches
bool wantMore=true; bool wantMore=true;
do { do {
size_t matchCount=0;
wantMore=false; wantMore=false;
matchSize+=8; matchSize+=8;
for (size_t i=0; i<matches.size(); i++) { for (size_t i=0; i<matches.size(); i++) {
@ -729,13 +727,11 @@ SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlock
// this match may be bigger // this match may be bigger
b.len=matchSize; b.len=matchSize;
wantMore=true; wantMore=true;
matchCount++;
} else { } else {
// this is the max size // this is the max size
b.done=true; b.done=true;
} }
} }
//logV("size %d: %d matches",(int)matchSize,(int)matchCount);
} while (wantMore); } while (wantMore);
// first stage done // first stage done
@ -783,7 +779,6 @@ SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlock
if (i.len>matchSize) matchSize=i.len; if (i.len>matchSize) matchSize=i.len;
} }
//while (matchSize>=MIN_MATCH_SIZE) {
workMatches.clear(); workMatches.clear();
// find matches with matching size // find matches with matching size
for (BlockMatch& i: matches) { for (BlockMatch& i: matches) {
@ -910,11 +905,6 @@ SafeWriter* findSubBlocks(SafeWriter* stream, std::vector<SafeWriter*>& subBlock
} }
} }
//if (matchSize>=MIN_MATCH_SIZE) {
//logV("trying next size %d",matchSize);
//}
//}
logV("done!"); logV("done!");
// get out if we haven't made any blocks // get out if we haven't made any blocks