-
Notifications
You must be signed in to change notification settings - Fork 951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add empty() for cpr::Cookies #1046
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiaoloudongfeng thanks! Please make it const and we are ready to go.
cpr/cookies.cpp
Outdated
@@ -100,6 +100,10 @@ void Cookies::emplace_back(const Cookie& str) { | |||
cookies_.emplace_back(str); | |||
} | |||
|
|||
bool Cookies::empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool Cookies::empty() { | |
bool Cookies::empty() const { |
I would suggest making it const.
include/cpr/cookies.h
Outdated
@@ -80,6 +80,7 @@ class Cookies { | |||
const_iterator cbegin() const; | |||
const_iterator cend() const; | |||
void emplace_back(const Cookie& str); | |||
bool empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool empty(); | |
[[nodiscard]] bool empty() const; |
@COM8 sorry I was careless, it has been fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.