[sword-svn] r3757 - trunk/include
scribe at crosswire.org
scribe at crosswire.org
Fri Jul 24 13:38:34 EDT 2020
Author: scribe
Date: 2020-07-24 13:38:34 -0400 (Fri, 24 Jul 2020)
New Revision: 3757
Modified:
trunk/include/swbuf.h
Log:
Added const operator [] members to SWBuf
Modified: trunk/include/swbuf.h
===================================================================
--- trunk/include/swbuf.h 2020-07-23 05:19:09 UTC (rev 3756)
+++ trunk/include/swbuf.h 2020-07-24 17:38:34 UTC (rev 3757)
@@ -381,6 +381,10 @@
inline char &operator[](long pos) { return charAt((unsigned long)pos); }
inline char &operator[](unsigned int pos) { return charAt((unsigned long)pos); }
inline char &operator[](int pos) { return charAt((unsigned long)pos); }
+ inline const char &operator[](unsigned long pos) const { return charAt(pos); }
+ inline const char &operator[](long pos) const { return charAt((unsigned long)pos); }
+ inline const char &operator[](unsigned int pos) const { return charAt((unsigned long)pos); }
+ inline const char &operator[](int pos) const { return charAt((unsigned long)pos); }
inline SWBuf &operator =(const char *newVal) { set(newVal); return *this; }
inline SWBuf &operator =(const SWBuf &other) { set(other); return *this; }
inline SWBuf &operator +=(const char *str) { return append(str); }
More information about the sword-cvs
mailing list