mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-04 00:19:56 +00:00
DREAMWEB: Turn Segment into a class, make members private
This commit is contained in:
parent
ba9eb8bffd
commit
ebc3ff5b92
@ -117,9 +117,15 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct Segment {
|
||||
class Segment {
|
||||
Common::Array<uint8> data;
|
||||
|
||||
public:
|
||||
Segment(uint size = 0) {
|
||||
if (size > 0)
|
||||
data.resize(size);
|
||||
}
|
||||
|
||||
inline void assign(const uint8 *b, const uint8 *e) {
|
||||
data.assign(b, e);
|
||||
}
|
||||
@ -276,8 +282,7 @@ public:
|
||||
_freeSegments.pop_front();
|
||||
}
|
||||
assert(!_segments.contains(id));
|
||||
SegmentPtr seg(new Segment());
|
||||
seg->data.resize(size);
|
||||
SegmentPtr seg(new Segment(size));
|
||||
_segments[id] = seg;
|
||||
return SegmentRef(this, id, seg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user