From ef5c4144d787a0c03d296e29f17f5f9deba7ba9b Mon Sep 17 00:00:00 2001 From: adikabintang Date: Thu, 26 Apr 2018 12:07:44 +0700 Subject: [PATCH] add keyword inline to some function definitions to avoid linking error --- httplib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/httplib.h b/httplib.h index 546b10f..c3a0021 100644 --- a/httplib.h +++ b/httplib.h @@ -769,7 +769,7 @@ inline bool read_headers(Stream& strm, Headers& headers) return true; } -bool read_content_with_length(Stream& strm, std::string& out, size_t len, Progress progress) +inline bool read_content_with_length(Stream& strm, std::string& out, size_t len, Progress progress) { out.assign(len, 0); size_t r = 0; @@ -789,7 +789,7 @@ bool read_content_with_length(Stream& strm, std::string& out, size_t len, Progre return true; } -bool read_content_without_length(Stream& strm, std::string& out) +inline bool read_content_without_length(Stream& strm, std::string& out) { for (;;) { char byte; @@ -805,7 +805,7 @@ bool read_content_without_length(Stream& strm, std::string& out) return true; } -bool read_content_chunked(Stream& strm, std::string& out) +inline bool read_content_chunked(Stream& strm, std::string& out) { const auto bufsiz = 16; char buf[bufsiz];