Skip to content

Commit

Permalink
detab and trim
Browse files Browse the repository at this point in the history
  • Loading branch information
jjsuwa committed Sep 27, 2020
1 parent a07ec5c commit bdb7b32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cores/esp8266/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ class String {
// parsing/conversion
long toInt(void) const;
float toFloat(void) const;
double toDouble(void) const;
double toDouble(void) const;

protected:
// Contains the string info when we're not in SSO mode
struct _ptr {
struct _ptr {
char * buff;
uint16_t cap;
uint16_t len;
Expand All @@ -306,7 +306,7 @@ class String {
inline void setSSO(bool set) { sso.isHeap = !set; }
inline void setLen(int len) { if (isSSO()) sso.len = len; else ptr.len = len; }
inline void setCapacity(int cap) { if (!isSSO()) ptr.cap = cap; }
inline void setBuffer(char *buff) { if (!isSSO()) ptr.buff = buff; }
inline void setBuffer(char *buff) { if (!isSSO()) ptr.buff = buff; }
// Buffer accessor functions
inline const char *buffer() const { return (const char *)(isSSO() ? sso.buff : ptr.buff); }
inline char *wbuffer() const { return isSSO() ? const_cast<char *>(sso.buff) : ptr.buff; } // Writable version of buffer
Expand Down

0 comments on commit bdb7b32

Please sign in to comment.