Skip to content

Commit

Permalink
improve functions prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrumins committed Dec 17, 2012
1 parent 05f8a91 commit e8ae837
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/hwnd-finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define DEBUG 0

static inline
void
std::vector<std::string> &
split(
const std::string &str,
const char delim,
Expand All @@ -24,10 +24,12 @@ split(
while (std::getline(ss, item, delim)) {
container.push_back(item);
}

return container;
}

static inline
void
std::string &
ltrim(std::string &str)
{
str.erase(
Expand All @@ -38,10 +40,11 @@ ltrim(std::string &str)
std::not1(std::ptr_fun<int, int>(std::isspace))
)
);
return str;
}

static inline
void
std::string &
rtrim(std::string &str)
{
str.erase(
Expand All @@ -52,18 +55,18 @@ rtrim(std::string &str)
).base(),
str.end()
);
return str;
}

static inline
void
std::string &
trim(std::string &str)
{
rtrim(str);
ltrim(str);
return ltrim(rtrim(str));
}

static inline
void
std::vector<std::string> &
trim(std::vector<std::string> &container)
{
for (std::vector<std::string>::iterator it = container.begin();
Expand All @@ -72,6 +75,7 @@ trim(std::vector<std::string> &container)
{
trim(*it);
}
return container;
}

struct EnumData {
Expand Down

0 comments on commit e8ae837

Please sign in to comment.