Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dranikpg committed Jul 14, 2022
1 parent fb327f4 commit cee7f78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions include/crow/middlewares/cookie_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ namespace crow
}

template<typename U>
void value(U&& value)
Cookie& value(U&& value)
{
value_ = std::forward<U>(value);
return *this;
}

// Expires attribute
Expand Down Expand Up @@ -217,9 +218,10 @@ namespace crow
return cookies_to_add.back();
}

void set_cookie(Cookie cookie)
Cookie& set_cookie(Cookie cookie)
{
cookies_to_add.push_back(std::move(cookie));
return cookies_to_add.back();
}

private:
Expand Down
4 changes: 2 additions & 2 deletions include/crow/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ namespace crow
}
}

inline std::string random_alphanum(std::size_t size)
inline static std::string random_alphanum(std::size_t size)
{
static const char alphabet[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
std::random_device dev;
Expand All @@ -799,7 +799,7 @@ namespace crow
return out;
}

inline std::string join_path(std::string path, const std::string& fname)
inline static std::string join_path(std::string path, const std::string& fname)
{
#ifdef CROW_CAN_USE_CPP17
return std::filesystem::path(path) / fname;
Expand Down

0 comments on commit cee7f78

Please sign in to comment.