Skip to content

Commit 704bc60

Browse files
committed
Minor cleanup,
1 parent 8a4185b commit 704bc60

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

Source/Plugins/PluginRAS.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ class CachedIO {
117117
uint8_t cache_[1024];
118118
FreeImageIO *io_{};
119119
fi_handle handle_{};
120-
uint32_t pos_{}, sz_{}, remaining{};
121-
uint8_t repchar{};
120+
uint32_t pos_{}, sz_{}, remaining_{};
121+
uint8_t repchar_{};
122122
};
123123

124124
bool CachedIO::ReadData(uint8_t *buf, uint32_t length, FIBOOL rle) {
@@ -128,18 +128,18 @@ bool CachedIO::ReadData(uint8_t *buf, uint32_t length, FIBOOL rle) {
128128
// Run-length encoded read
129129

130130
while (length) {
131-
if (remaining) {
132-
const auto len{ std::min(remaining, length) };
133-
std::memset(buf, repchar, len);
131+
if (remaining_) {
132+
const auto len{ std::min(remaining_, length) };
133+
std::memset(buf, repchar_, len);
134134
buf += len;
135135
length -= len;
136-
remaining -= len;
136+
remaining_ -= len;
137137
} else {
138-
if (!this->getByte(repchar)) {
138+
if (!this->getByte(repchar_)) {
139139
break;
140140
}
141141

142-
if (RESC == repchar) {
142+
if (RESC == repchar_) {
143143
uint8_t tmp{};
144144
if (!this->getByte(tmp)) {
145145
break;
@@ -149,19 +149,19 @@ bool CachedIO::ReadData(uint8_t *buf, uint32_t length, FIBOOL rle) {
149149
*(buf++)= RESC;
150150
--length;
151151
} else {
152-
if (!this->getByte(repchar)) {
152+
if (!this->getByte(repchar_)) {
153153
break;
154154
}
155155

156-
remaining = tmp + 1;
157-
const auto len{ std::min(remaining, length) };
158-
std::memset(buf, repchar, len);
156+
remaining_ = tmp + 1;
157+
const auto len{ std::min(remaining_, length) };
158+
std::memset(buf, repchar_, len);
159159
buf += len;
160160
length -= len;
161-
remaining -= len;
161+
remaining_ -= len;
162162
}
163163
} else {
164-
*(buf++)= repchar;
164+
*(buf++)= repchar_;
165165
--length;
166166
}
167167
}

0 commit comments

Comments
 (0)