Skip to content

Commit

Permalink
Remove redundant std:: thoughout the repository
Browse files Browse the repository at this point in the history
  • Loading branch information
GreaterFire committed Mar 22, 2020
1 parent 9d001d5 commit 26637b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/core/authenticator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool Authenticator::auth(const string &password) {
return true;
}

void Authenticator::record(const std::string &password, uint64_t download, uint64_t upload) {
void Authenticator::record(const string &password, uint64_t download, uint64_t upload) {
if (!is_valid_password(password)) {
return;
}
Expand All @@ -82,7 +82,7 @@ void Authenticator::record(const std::string &password, uint64_t download, uint6
}
}

bool Authenticator::is_valid_password(const std::string &password) {
bool Authenticator::is_valid_password(const string &password) {
if (password.size() != PASSWORD_LENGTH) {
return false;
}
Expand All @@ -102,8 +102,8 @@ Authenticator::~Authenticator() {

Authenticator::Authenticator(const Config&) {}
bool Authenticator::auth(const string&) { return true; }
void Authenticator::record(const std::string&, uint64_t, uint64_t) {}
bool Authenticator::is_valid_password(const std::string&) { return true; }
void Authenticator::record(const string&, uint64_t, uint64_t) {}
bool Authenticator::is_valid_password(const string&) { return true; }
Authenticator::~Authenticator() {}

#endif // ENABLE_MYSQL
2 changes: 1 addition & 1 deletion src/core/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void Config::load(const string &filename) {
populate(tree);
}

void Config::populate(const std::string &JSON) {
void Config::populate(const string &JSON) {
istringstream s(JSON);
ptree tree;
read_json(s, tree);
Expand Down
2 changes: 1 addition & 1 deletion src/proto/trojanrequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int TrojanRequest::parse(const string &data) {
return data.length();
}

std::string TrojanRequest::generate(const std::string &password, const std::string &domainname, uint16_t port, bool tcp) {
string TrojanRequest::generate(const string &password, const string &domainname, uint16_t port, bool tcp) {
string ret = password + "\r\n";
if (tcp) {
ret += '\x01';
Expand Down
2 changes: 1 addition & 1 deletion src/session/serversession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void ServerSession::in_recv(const string &data) {
if (alpn_out == NULL) {
return config.remote_port;
}
auto it = config.ssl.alpn_port_override.find(std::string(alpn_out, alpn_out + alpn_len));
auto it = config.ssl.alpn_port_override.find(string(alpn_out, alpn_out + alpn_len));
return it == config.ssl.alpn_port_override.end() ? config.remote_port : it->second;
}());
if (valid) {
Expand Down

0 comments on commit 26637b3

Please sign in to comment.