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
My recs #1
base: master
Are you sure you want to change the base?
My recs #1
Conversation
Removes explicit clang version number.
send(Http::sck, req, std::string(req).length(), 0); | ||
char* buffer = (char *)malloc(BUFFER_SIZE); |
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.
if you really were to malloc, the most C++-ish thing here would've been
auto buffer = static_cast<char*>(std::malloc(BUFFER_SIZE));
@@ -35,15 +33,12 @@ void Http::connect(std::string url) { | |||
} | |||
|
|||
std::string Http::makeRequest(const char *req) { | |||
constexpr auto BUFFER_SIZE = 10000; | |||
send(Http::sck, req, std::string(req).length(), 0); |
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.
std::string(req).length()
should be std::strlen(req)
mah b.
+1 |
Good job dudes.
This is mostly academic or "modernizing" stuff. Only the change in http.cpp fixes an actual problem. Bringing down the makefile is pretty good to know too, IMO, but for anything over small projects I'd recommend learning
scons
or another system.