Skip to content

Commit

Permalink
Replace strcpy_s with strcpy in options_manager
Browse files Browse the repository at this point in the history
The <cstring> library has replaced the <sec_api/string_s.h> library to use the strcpy function, which performs the same function as strcpy_s. This change simplifies the code without altering the functionality.
  • Loading branch information
Drew-Chase committed Apr 8, 2024
1 parent addb699 commit b40c81e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/options_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#define CCOMMANDLINEPARSER_OPTIONS_MANAGER_H

#include <algorithm>
#include <cstring>
#include <vector>
#include <iostream>
#include <sstream>
#include <sec_api/string_s.h>
// #include <sec_api/string_s.h>

using namespace std;

Expand Down Expand Up @@ -219,8 +220,7 @@ namespace cclip

const size_t length = buf.str().length() + 1;
const auto help_str = new char[length];
strcpy_s(help_str, length, buf.str().c_str());

strcpy(help_str, buf.str().c_str());
return help_str;
}

Expand Down

0 comments on commit b40c81e

Please sign in to comment.