Skip to content

Commit 9711ed8

Browse files
moving static function variables as object attributes
1 parent cef0793 commit 9711ed8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/decompress/lzss.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ LZSSDecoder::status LZSSDecoder::decompress(uint8_t* const buffer, uint32_t size
257257
}
258258

259259
int LZSSDecoder::getbit(int n) { // get n bits from buffer
260-
static uint32_t buf, buf_size=0;
261260
int x=0, c;
262261

263262
// if the local bit buffer doesn't have enough bit get them

src/decompress/lzss.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ class LZSSDecoder {
7979

8080
// get 1 bit from the available input buffer
8181
int getbit(int n);
82+
// the following 2 are variables used by getbits
83+
uint32_t buf, buf_size=0;
8284

8385
enum FSM_STATES: uint8_t {
8486
FSM_0 = 0,

0 commit comments

Comments
 (0)