Skip to content

Commit

Permalink
Merge pull request #8 from AlexStocks/lihao-clang
Browse files Browse the repository at this point in the history
format codes again
  • Loading branch information
ForestLH authored May 27, 2023
2 parents 62d8635 + 008f567 commit 7a2b3bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/pika_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ void InfoCmd::InfoKeyspace(std::string& info) {
if (rescan_) {
g_pika_server->DoSameThingSpecificTable(TaskType::kStartKeyScan, keyspace_scan_tables_);
}
}
}

void InfoCmd::InfoData(std::string& info) {
std::stringstream tmp_stream;
Expand Down
6 changes: 3 additions & 3 deletions src/pika_bit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void BitGetCmd::DoInitial() {
res_.SetRes(CmdRes::kInvalidBitOffsetInt);
return;
}
}
}

void BitGetCmd::Do(std::shared_ptr<Partition> partition) {
int32_t bit_val = 0;
Expand Down Expand Up @@ -96,7 +96,7 @@ void BitCountCmd::DoInitial() {
} else {
res_.SetRes(CmdRes::kSyntaxErr, kCmdNameBitCount);
}
}
}

void BitCountCmd::Do(std::shared_ptr<Partition> partition) {
int32_t count = 0;
Expand Down Expand Up @@ -204,7 +204,7 @@ void BitOpCmd::DoInitial() {
for (unsigned int i = 3; i <= argv_.size() - 1; i++) {
src_keys_.emplace_back(argv_[i].data());
}
}
}

void BitOpCmd::Do(std::shared_ptr<Partition> partition) {
int64_t result_length;
Expand Down
20 changes: 12 additions & 8 deletions src/pika_geohash_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,18 @@ GeoHashRadius geohashGetAreasByRadius(double longitude, double latitude, double
geohashDecode(long_range, lat_range, neighbors.east, &east);
geohashDecode(long_range, lat_range, neighbors.west, &west);

if (geohashGetDistance(longitude, latitude, longitude, north.latitude.max) < radius_meters) { decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, longitude, south.latitude.min) < radius_meters) { decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, east.longitude.max, latitude) < radius_meters) { decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, west.longitude.min, latitude) < radius_meters) { decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, longitude, north.latitude.max) < radius_meters) {
decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, longitude, south.latitude.min) < radius_meters) {
decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, east.longitude.max, latitude) < radius_meters) {
decrease_step = 1;
}
if (geohashGetDistance(longitude, latitude, west.longitude.min, latitude) < radius_meters) {
decrease_step = 1;
}
}

if (steps > 1 && (decrease_step != 0)) {
Expand Down

0 comments on commit 7a2b3bd

Please sign in to comment.