diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2023-04-24 10:37:48 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2023-04-24 10:37:48 -0700 |
commit | 944e2b6a9d8ee97c3202ac0403edec234d0bfa31 (patch) | |
tree | 28a8383f475f2e2fb8f22de609671cb379603cf3 /src/stable | |
parent | af849fa314ad335e14c82a2018ee7d7bea91842a (diff) | |
download | libbu++-944e2b6a9d8ee97c3202ac0403edec234d0bfa31.tar.gz libbu++-944e2b6a9d8ee97c3202ac0403edec234d0bfa31.tar.bz2 libbu++-944e2b6a9d8ee97c3202ac0403edec234d0bfa31.tar.xz libbu++-944e2b6a9d8ee97c3202ac0403edec234d0bfa31.zip |
More tweaks to make things easier to transition.
Diffstat (limited to 'src/stable')
-rw-r--r-- | src/stable/string.cpp | 10 | ||||
-rw-r--r-- | src/stable/string.h | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/stable/string.cpp b/src/stable/string.cpp index ed4e58b..98b78bd 100644 --- a/src/stable/string.cpp +++ b/src/stable/string.cpp | |||
@@ -516,6 +516,16 @@ const char *Bu::String::getStr() const | |||
516 | return core->pFirst->pData; | 516 | return core->pFirst->pData; |
517 | } | 517 | } |
518 | 518 | ||
519 | char *Bu::String::getData() | ||
520 | { | ||
521 | return getStr(); | ||
522 | } | ||
523 | |||
524 | const char *Bu::String::getData() const | ||
525 | { | ||
526 | return getStr(); | ||
527 | } | ||
528 | |||
519 | const char *Bu::String::getConstStr() const | 529 | const char *Bu::String::getConstStr() const |
520 | { | 530 | { |
521 | return getStr(); | 531 | return getStr(); |
diff --git a/src/stable/string.h b/src/stable/string.h index c469580..1fc5496 100644 --- a/src/stable/string.h +++ b/src/stable/string.h | |||
@@ -721,6 +721,18 @@ namespace Bu | |||
721 | *@returns (const char *) The string data. | 721 | *@returns (const char *) The string data. |
722 | */ | 722 | */ |
723 | const char *getStr() const; | 723 | const char *getStr() const; |
724 | |||
725 | /** | ||
726 | * Get a pointer to the string array. | ||
727 | *@returns (char *) The string data. | ||
728 | */ | ||
729 | char *getData(); | ||
730 | |||
731 | /** | ||
732 | * Get a const pointer to the string array. | ||
733 | *@returns (const char *) The string data. | ||
734 | */ | ||
735 | const char *getData() const; | ||
724 | 736 | ||
725 | /** | 737 | /** |
726 | * A convinience function, this one won't cause as much work as the | 738 | * A convinience function, this one won't cause as much work as the |