Changeset 1894


Ignore:
Timestamp:
Jan 27, 2012, 3:44:55 PM (7 years ago)
Author:
ksherdy
Message:

Added const modifier bit block iterator and scanner.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock_scan.hpp

    r1892 r1894  
    2222protected:
    2323        Scanner(): strm(NULL), pos(-1), blk(-1), scan_blk(-1) {}
    24         Scanner(bitblock_t * s, uint32_t start_pos, uint32_t start_blk, scanblock_t start_scan_blk): strm(s), pos(start_pos), blk(start_blk), scan_blk(start_scan_blk) {}
     24        Scanner(const bitblock_t * s, uint32_t start_pos, uint32_t start_blk, scanblock_t start_scan_blk): strm(s), pos(start_pos), blk(start_blk), scan_blk(start_scan_blk) {}
    2525
    26         bitblock_t * strm;
     26        const bitblock_t * strm;
    2727        int32_t pos;
    2828        uint32_t blk;
     
    3939
    4040        ForwardScanner(){}
    41         ForwardScanner(bitblock_t * s) {
     41        ForwardScanner(const bitblock_t * s) {
    4242                init(s);
    4343        }
    4444
    45         IDISA_ALWAYS_INLINE void init(bitblock_t * s) {
     45        IDISA_ALWAYS_INLINE void init(const bitblock_t * s) {
    4646                this->strm = s;
    4747                this->pos = 0;
     
    7878public:
    7979        ReverseScanner(){}
    80         ReverseScanner(bitblock_t * s) {
     80        ReverseScanner(const bitblock_t * s) {
    8181                init(s);
    8282        }
    83         IDISA_ALWAYS_INLINE void init(bitblock_t * s) {
     83        IDISA_ALWAYS_INLINE void init(const bitblock_t * s) {
    8484                this->strm = s;
    8585                this->pos = 0;
  • trunk/lib/bitstream_iterator.hpp

    r1892 r1894  
    2020        }
    2121
    22         BitStreamIterator(BitBlock * s, int cnt):pos(0),        // TODO - Update logic to support array of BitBlock * type
     22        BitStreamIterator(const BitBlock * s, int cnt):pos(0),  // TODO - Update logic to support array of BitBlock * type
    2323                                                                                         blk(0),
    2424                                                                                         blk_pos(0),
     
    9696        int32_t blk;
    9797        int32_t blk_pos;
    98         BitBlock * strm;
     98        const BitBlock * strm;
    9999        scanword_t scan_blk;
    100100        uint32_t scan_blk_cnt;
Note: See TracChangeset for help on using the changeset viewer.