* Made _Allocate() static.

* Moved the private inline methods up in the source file, so they can actually
  be inlined.
* UnlockBuffer(): Removed superfluous "if". Maybe the one who wrote it can have
  a look and check whether something else was intended originally.
* _MakeWritable() (both versions): Removed the superfluous ref count increment
  and the matching decrements.
* _Resize(): Fixed ref count ASSERT. It would always be triggered when called
  from UnlockBuffer(), since the ref count is -1 in that case.
* Clarified some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31662 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-07-21 00:04:46 +00:00
parent 520cf2669f
commit 1746066cde
2 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -246,7 +246,7 @@ private:
// Management
status_t _MakeWritable();
status_t _MakeWritable(int32 length, bool copy);
char* _Allocate(int32 length);
static char* _Allocate(int32 length);
char* _Resize(int32 length);
void _Init(const char* src, int32 length);
char* _Clone(const char* data, int32 length);