Skip to content

Commit

Permalink
fix: remove debug argument in Cmakelists, use const reference to prev…
Browse files Browse the repository at this point in the history
…ent copy var
  • Loading branch information
hiikariri committed Jun 19, 2024
1 parent e94f5f2 commit 9cc5398
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

# Set the build type to Debug if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -fPIC -g3)
add_compile_options(-Wall -Wextra -Wpedantic -fPIC)
endif()

find_package(ament_cmake REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion src/shisen_cpp_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(int argc, char ** argv)
int i = 1;
int pos = 0;
while (i < args.size()) {
std::string arg = args[i++];
const std::string& arg = args[i++];
if (arg[0] == '-') {
if (arg == "-h" || arg == "--help") {
std::cout << help_message << std::endl;
Expand Down

0 comments on commit 9cc5398

Please sign in to comment.