Skip to content

Commit

Permalink
Polish code
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <ganze718@gmail.com>
  • Loading branch information
Pterosaur committed Dec 23, 2020
1 parent 8f4f88d commit cd10f06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 1 addition & 4 deletions common/redisutility.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __REDISUTILITY__
#define __REDISUTILITY__
#pragma once

#include "rediscommand.h"
#include "logger.h"
Expand Down Expand Up @@ -51,5 +50,3 @@ static bool get_value(
return false;
}
}

#endif
1 change: 0 additions & 1 deletion common/stringutility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ std::string swss::binary_to_hex(const void *buffer, size_t length)

return s;
}

9 changes: 3 additions & 6 deletions common/stringutility.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef __STRINGUTILITY__
#define __STRINGUTILITY__
#pragma once

#include "logger.h"

Expand All @@ -23,7 +22,7 @@ bool split(const std::string &input, char delimiter, T &output)
}

template <typename T, typename... Args>
bool split(const std::string &input, char delimiter, T &output, Args &... args)
bool split(const std::string &input, char delimiter, T &output, Args &... args)
{
SWSS_LOG_ENTER();
auto pos = input.find(delimiter);
Expand All @@ -37,7 +36,7 @@ bool split(const std::string &input, char delimiter, T &output, Args &... args)
}

template <typename T>
std::string join(char delimiter, const T &input)
std::string join(__attribute__((unused)) char delimiter, const T &input)
{
SWSS_LOG_ENTER();
std::ostringstream ostream;
Expand Down Expand Up @@ -71,5 +70,3 @@ void hex_to_binary(
std::string binary_to_hex(const void *buffer, size_t length);

}

#endif

0 comments on commit cd10f06

Please sign in to comment.