Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Dec 15, 2023
1 parent e89e0d0 commit 41a7b9d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/backend/src/room/RoomManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ std::mutex RoomManager::m_;
std::map<std::string, std::shared_ptr<Room>> RoomManager::rooms;

RoomManager* RoomManager::instance() {
// cppcheck-suppress identicalInnerCondition
if (pinstance == nullptr) {
std::lock_guard<std::mutex> lock(m_);
if (pinstance == nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion app/backend/src/room/User.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class User
const drogon::WebSocketConnectionPtr getConnection() const { return this->connection; }

private:
const drogon::SubscriberID id;
const std::string chat_room_name;
const UserType type;
const drogon::SubscriberID id;
const drogon::WebSocketConnectionPtr connection;

std::string name;
Expand Down
2 changes: 1 addition & 1 deletion app/raspberry_pi/include/rplidar/RPLidar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ namespace rplidar {
{
int dsize = scanning.dsize;

if (maxBufMeas)
if (maxBufMeas != 0)
{
int dataInBuf = this->_serial->available();
if (dataInBuf > maxBufMeas)
Expand Down
2 changes: 1 addition & 1 deletion app/raspberry_pi/src/car/system/CarSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace car::system {
void terminate();

void move(const MoveCommand& move_command);
void turn(const TurnCommand& move_command);
void turn(const TurnCommand& turn_command);

private:
std::unique_ptr<LidarDevice> lidar_device;
Expand Down

0 comments on commit 41a7b9d

Please sign in to comment.