diff options
Diffstat (limited to 'linden/indra/llcommon/llstring.h')
-rw-r--r-- | linden/indra/llcommon/llstring.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index a83b7cf..0485a1e 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include "stdtypes.h" | 31 | #include "stdtypes.h" |
32 | #include "llerror.h" | 32 | #include "llerror.h" |
33 | #include "llfile.h" | ||
33 | #include <algorithm> | 34 | #include <algorithm> |
34 | #include <map> | 35 | #include <map> |
35 | #include <stdio.h> | 36 | #include <stdio.h> |
@@ -101,7 +102,7 @@ struct char_traits<U16> | |||
101 | 102 | ||
102 | static char_type* | 103 | static char_type* |
103 | copy(char_type* __s1, const char_type* __s2, size_t __n) | 104 | copy(char_type* __s1, const char_type* __s2, size_t __n) |
104 | { return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); } | 105 | { return static_cast<char_type*>(memcpy(__s1, __s2, __n * sizeof(char_type))); } /* Flawfinder: ignore */ |
105 | 106 | ||
106 | static char_type* | 107 | static char_type* |
107 | assign(char_type* __s, size_t __n, char_type __a) | 108 | assign(char_type* __s, size_t __n, char_type __a) |
@@ -922,7 +923,7 @@ void LLStringBase<T>::replaceNonstandardASCII( std::basic_string<T>& string, T r | |||
922 | 923 | ||
923 | //static | 924 | //static |
924 | template<class T> | 925 | template<class T> |
925 | void LLStringBase<T>::replaceTabsWithSpaces( std::basic_string<T>& string, size_type spaces_per_tab ) | 926 | void LLStringBase<T>::replaceTabsWithSpaces( std::basic_string<T>& str, size_type spaces_per_tab ) |
926 | { | 927 | { |
927 | llassert( spaces_per_tab >= 0 ); | 928 | llassert( spaces_per_tab >= 0 ); |
928 | 929 | ||
@@ -931,19 +932,19 @@ void LLStringBase<T>::replaceTabsWithSpaces( std::basic_string<T>& string, size_ | |||
931 | 932 | ||
932 | LLStringBase<T> out_str; | 933 | LLStringBase<T> out_str; |
933 | // Replace tabs with spaces | 934 | // Replace tabs with spaces |
934 | for (size_type i = 0; i < string.length(); i++) | 935 | for (size_type i = 0; i < str.length(); i++) |
935 | { | 936 | { |
936 | if (string[i] == TAB) | 937 | if (str[i] == TAB) |
937 | { | 938 | { |
938 | for (size_type j = 0; j < spaces_per_tab; j++) | 939 | for (size_type j = 0; j < spaces_per_tab; j++) |
939 | out_str += SPACE; | 940 | out_str += SPACE; |
940 | } | 941 | } |
941 | else | 942 | else |
942 | { | 943 | { |
943 | out_str += string[i]; | 944 | out_str += str[i]; |
944 | } | 945 | } |
945 | } | 946 | } |
946 | string = out_str; | 947 | str = out_str; |
947 | } | 948 | } |
948 | 949 | ||
949 | //static | 950 | //static |