inline some string functions - disable warnings

v1
Brett 2023-08-31 21:47:32 -04:00
parent d3ed46686e
commit 650af9877f
3 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ namespace blt::fs
*/ */
virtual int read(char* buffer, size_t bytes) = 0; virtual int read(char* buffer, size_t bytes) = 0;
virtual int gcount() = 0; virtual size_t gcount() = 0;
virtual char get() virtual char get()
{ {
@ -102,7 +102,7 @@ namespace blt::fs
int read(char* buffer, size_t bytes) override; int read(char* buffer, size_t bytes) override;
int gcount() final { size_t gcount() final {
return m_stream.gcount(); return m_stream.gcount();
} }

View File

@ -454,7 +454,7 @@ namespace blt::logging {
} }
/** /**
* Checks if the next character in the parser is a tag opening, if not output the chars to the out string * Checks if the next character in the parser is a tag opening, if not output the buffer to the out string
*/ */
inline bool tagOpening(string_parser& parser, std::string& out){ inline bool tagOpening(string_parser& parser, std::string& out){
char c = ' '; char c = ' ';

View File

@ -140,7 +140,7 @@ namespace blt::string {
} }
// https://stackoverflow.com/questions/3418231/replace-part-of-a-string-with-another-string // https://stackoverflow.com/questions/3418231/replace-part-of-a-string-with-another-string
static bool replace(std::string& str, const std::string& from, const std::string& to) { static inline bool replace(std::string& str, const std::string& from, const std::string& to) {
size_t start_pos = str.find(from); size_t start_pos = str.find(from);
if(start_pos == std::string::npos) if(start_pos == std::string::npos)
return false; return false;
@ -148,7 +148,7 @@ namespace blt::string {
return true; return true;
} }
static void replaceAll(std::string& str, const std::string& from, const std::string& to) { static inline void replaceAll(std::string& str, const std::string& from, const std::string& to) {
if(from.empty()) if(from.empty())
return; return;
size_t start_pos = 0; size_t start_pos = 0;