summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/src
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-07-24 14:57:38 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-07-24 14:57:38 -0600
commit2bec876c8e5e6abdca9859ed56b18a7d1a71feb8 (patch)
tree952de3aa265f21b0ad7f5d6af7f383c05a14d1ad /NxWidgets/libnxwidgets/src
parent047cdbcf3dfb493818e2eb33db25a2a70f2bb15d (diff)
downloadnuttx-2bec876c8e5e6abdca9859ed56b18a7d1a71feb8.tar.gz
nuttx-2bec876c8e5e6abdca9859ed56b18a7d1a71feb8.tar.bz2
nuttx-2bec876c8e5e6abdca9859ed56b18a7d1a71feb8.zip
NxWidgets::CNxString: Add a getAllocSize() method to make it easier to convert CNxStrings to NUL-terminated C strings
Diffstat (limited to 'NxWidgets/libnxwidgets/src')
-rw-r--r--NxWidgets/libnxwidgets/src/cnxstring.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/NxWidgets/libnxwidgets/src/cnxstring.cxx b/NxWidgets/libnxwidgets/src/cnxstring.cxx
index 8548de636..4962858fa 100644
--- a/NxWidgets/libnxwidgets/src/cnxstring.cxx
+++ b/NxWidgets/libnxwidgets/src/cnxstring.cxx
@@ -161,9 +161,9 @@ CStringIterator *CNxString::newStringIterator() const
/**
* Copy the internal array to the supplied buffer. The buffer must be
* large enough to contain the full text in the string. The
- * getByteCount() method can be used to obtain the length of the string.
+ * getAllocSize() method can be used to obtain the length of the string.
* Unlike the CNxString class, the char array is null-terminated.
- * The buffer must be (getByteCount() + 2) bytes long, in order to
+ * The buffer must be (getAllocSize() + 2) bytes long, in order to
* accommodate the terminator.
*
* @param buffer Buffer to copy the internal char array to.
@@ -677,6 +677,7 @@ CNxString& CNxString::operator=(const CNxString &string)
{
setText(string);
}
+
return *this;
}
@@ -688,7 +689,7 @@ CNxString& CNxString::operator=(const CNxString &string)
* @return This string.
*/
-CNxString& CNxString::operator=(const char *string)
+CNxString& CNxString::operator=(FAR const char *string)
{
setText(string);
return *this;