inline some string functions - disable warnings
parent
d3ed46686e
commit
650af9877f
|
@ -38,7 +38,7 @@ namespace blt::fs
|
|||
*/
|
||||
virtual int read(char* buffer, size_t bytes) = 0;
|
||||
|
||||
virtual int gcount() = 0;
|
||||
virtual size_t gcount() = 0;
|
||||
|
||||
virtual char get()
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ namespace blt::fs
|
|||
|
||||
int read(char* buffer, size_t bytes) override;
|
||||
|
||||
int gcount() final {
|
||||
size_t gcount() final {
|
||||
return m_stream.gcount();
|
||||
}
|
||||
|
||||
|
|
|
@ -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){
|
||||
char c = ' ';
|
||||
|
|
|
@ -140,7 +140,7 @@ namespace blt::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);
|
||||
if(start_pos == std::string::npos)
|
||||
return false;
|
||||
|
@ -148,7 +148,7 @@ namespace blt::string {
|
|||
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())
|
||||
return;
|
||||
size_t start_pos = 0;
|
||||
|
|
Loading…
Reference in New Issue