diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2008-06-04 03:17:05 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2008-06-04 03:17:05 +0000 |
commit | f0d7043a6ec0011c2fd8c8fbbe1250b15ae4aef3 (patch) | |
tree | 91f1b2a692e10c7c7202860b475d8ba8eab2bf88 /Plugins/utils/mir_buffer.h | |
parent | bc527b1e07f18ecab6badda0a96db529c3472043 (diff) |
some fixes
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@111 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/utils/mir_buffer.h')
-rw-r--r-- | Plugins/utils/mir_buffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Plugins/utils/mir_buffer.h b/Plugins/utils/mir_buffer.h index 4daf01e..f783c65 100644 --- a/Plugins/utils/mir_buffer.h +++ b/Plugins/utils/mir_buffer.h @@ -308,6 +308,16 @@ class Buffer memmove(str, tmp, len * sizeof(T));
}
+ void reverse()
+ {
+ for(size_t i = 0; i < len/2; i++)
+ {
+ T tmp = str[i];
+ str[i] = str[len-i-1];
+ str[len-i-1] = tmp;
+ }
+ }
+
T *appender(size_t appLen)
{
alloc(len + appLen + 1);
|