diff options
author | Robin Burchell <robin.burchell@collabora.com> | 2012-01-06 18:56:17 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-01-12 20:56:56 +0100 |
commit | b7f3d5518859a2baec4f1a52bf029da64bcd5844 (patch) | |
tree | 81bea2de826036cf808b1df6c3b4445ee4cc611d /src | |
parent | a06d43173c0909de58d260121013a8b5bda02b96 (diff) |
Remove out-of-line uses of qMalloc/qFree/qRealloc.
Per http://codereview.qt-project.org/#change,11562, we are trying to remove these
in favour of direct allocation, or (in the case of inline code) specialised
out-of-line wrappers.
Change-Id: I4d6580da66b9e1bd27a1d0c78f757ccf0aa7c034
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lalr.g | 6 | ||||
-rw-r--r-- | src/recognizer.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -249,7 +249,7 @@ Recognizer::Recognizer (Grammar *grammar, bool no_lines): Recognizer::~Recognizer() { if (stack_size) - ::qFree(state_stack); + ::free(state_stack); } inline void Recognizer::reallocateStack() @@ -262,9 +262,9 @@ inline void Recognizer::reallocateStack() sym_stack.resize (stack_size); if (! state_stack) - state_stack = reinterpret_cast<int*> (::qMalloc(stack_size * sizeof(int))); + state_stack = reinterpret_cast<int*> (::malloc(stack_size * sizeof(int))); else - state_stack = reinterpret_cast<int*> (::qRealloc(state_stack, stack_size * sizeof(int))); + state_stack = reinterpret_cast<int*> (::realloc(state_stack, stack_size * sizeof(int))); } int Recognizer::nextToken() diff --git a/src/recognizer.cpp b/src/recognizer.cpp index 9e27d33..ea9be44 100644 --- a/src/recognizer.cpp +++ b/src/recognizer.cpp @@ -58,7 +58,7 @@ Recognizer::Recognizer (Grammar *grammar, bool no_lines): Recognizer::~Recognizer() { if (stack_size) - ::qFree(state_stack); + ::free(state_stack); } inline void Recognizer::reallocateStack() @@ -71,9 +71,9 @@ inline void Recognizer::reallocateStack() sym_stack.resize (stack_size); if (! state_stack) - state_stack = reinterpret_cast<int*> (::qMalloc(stack_size * sizeof(int))); + state_stack = reinterpret_cast<int*> (::malloc(stack_size * sizeof(int))); else - state_stack = reinterpret_cast<int*> (::qRealloc(state_stack, stack_size * sizeof(int))); + state_stack = reinterpret_cast<int*> (::realloc(state_stack, stack_size * sizeof(int))); } int Recognizer::nextToken() |