Renamed private members

This commit is contained in:
fourtf
2018-07-06 19:23:47 +02:00
parent 6935619820
commit 280bb4cf8e
141 changed files with 1754 additions and 1861 deletions
+15 -15
View File
@@ -12,28 +12,28 @@ class LimitedQueueSnapshot
public:
LimitedQueueSnapshot() = default;
LimitedQueueSnapshot(std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> _chunks,
size_t _length, size_t _firstChunkOffset, size_t _lastChunkEnd)
: chunks(_chunks)
, length(_length)
, firstChunkOffset(_firstChunkOffset)
, lastChunkEnd(_lastChunkEnd)
LimitedQueueSnapshot(std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> chunks,
size_t length, size_t firstChunkOffset, size_t lastChunkEnd)
: chunks_(chunks)
, length_(length)
, firstChunkOffset_(firstChunkOffset)
, lastChunkEnd_(lastChunkEnd)
{
}
std::size_t getLength()
{
return this->length;
return this->length_;
}
T const &operator[](std::size_t index) const
{
index += this->firstChunkOffset;
index += this->firstChunkOffset_;
size_t x = 0;
for (size_t i = 0; i < this->chunks->size(); i++) {
auto &chunk = this->chunks->at(i);
for (size_t i = 0; i < this->chunks_->size(); i++) {
auto &chunk = this->chunks_->at(i);
if (x <= index && x + chunk->size() > index) {
return chunk->at(index - x);
@@ -43,15 +43,15 @@ public:
assert(false && "out of range");
return this->chunks->at(0)->at(0);
return this->chunks_->at(0)->at(0);
}
private:
std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> chunks;
std::shared_ptr<std::vector<std::shared_ptr<std::vector<T>>>> chunks_;
size_t length = 0;
size_t firstChunkOffset = 0;
size_t lastChunkEnd = 0;
size_t length_ = 0;
size_t firstChunkOffset_ = 0;
size_t lastChunkEnd_ = 0;
};
} // namespace chatterino