Przeglądaj źródła

Apply naming convention to Base64 CLI tool

Patrick-Christopher Mattulat 2 lat temu
rodzic
commit
ed0e31a5ce
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 1 1
      CMakeLists.txt
  2. 4 4
      source/ls-std/encoding/cli/cli-base64-main.cpp

+ 1 - 1
CMakeLists.txt

@@ -413,7 +413,7 @@ endif ()
 
 # CLI base64
 
-add_executable(cli_base64
+add_executable(cli-base64
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/encoding/cli/cli-base64-main.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/encoding/Base64.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls-std/core/Version.cpp)

+ 4 - 4
source/ls-std/encoding/cli/cli-base64-main.cpp

@@ -13,14 +13,14 @@
 #include <string>
 #include <vector>
 
-using CLICommand = std::vector<std::string>;
+using CliCommand = std::vector<std::string>;
 
 void printHelp();
-bool isValidCommand(const CLICommand &_command);
+bool isValidCommand(const CliCommand &_command);
 
 int main(int argc, char *argv[])
 {
-  CLICommand command(argv, argv + argc);
+  CliCommand command(argv, argv + argc);
 
   if (isValidCommand(command))
   {
@@ -58,7 +58,7 @@ void printHelp()
   std::cout << help << std::endl;
 }
 
-bool isValidCommand(const CLICommand &_command)
+bool isValidCommand(const CliCommand &_command)
 {
   return _command.size() == 3 && _command[1] == "--encode" && !_command[2].empty() || _command.size() == 3 && _command[1] == "--decode" && !_command[2].empty() || _command.size() == 2 && _command[1] == "--help";
 }