Skip to content

Commit

Permalink
remove some warning..
Browse files Browse the repository at this point in the history
  • Loading branch information
vztpv authored Aug 18, 2024
1 parent 3b57a83 commit dad144e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions claujson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4444,7 +4444,7 @@ namespace claujson {
start.resize(1 + _set.size());
last.resize(_set.size());

int count = 0;
uint64_t count = 0;
for (auto x : _set) { // order is important.
start[count] = x;
++count;
Expand Down Expand Up @@ -5919,7 +5919,7 @@ namespace claujson {
length = how_many;

start[0] = 0;
for (int i = 1; i < thr_num; ++i) {
for (uint64_t i = 1; i < thr_num; ++i) {
start[i] = how_many / thr_num * i;
}
}
Expand Down
6 changes: 3 additions & 3 deletions claujson.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace claujson {
}

int compare(const StringView view) {
int idx1 = 0, idx2 = 0;
uint64_t idx1 = 0, idx2 = 0;
for (; idx1 < this->length() && idx2 < view.length(); ++idx1, ++idx2) {
uint8_t diff = this->data()[idx1] - view.data()[idx2];
if (diff < 0) {
Expand Down Expand Up @@ -595,7 +595,7 @@ namespace claujson {
explicit String(const std::string& str) {
if (str.size() <= CLAUJSON_STRING_BUF_SIZE) {
memcpy(buf, str.data(), str.size());
this->sz = str.size();
this->sz = static_cast<uint32_t>(str.size()); // chk..
this->type = _ValueType::SHORT_STRING;
}
else {
Expand All @@ -607,7 +607,7 @@ namespace claujson {
}
memcpy(temp, str.data(), str.size());
this->str = temp;
this->sz = str.size();
this->sz = static_cast<uint32_t>(str.size());
this->type = _ValueType::STRING;
}
}
Expand Down

0 comments on commit dad144e

Please sign in to comment.