aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsmemorypool_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/parser/qqmljsmemorypool_p.h')
-rw-r--r--src/qml/parser/qqmljsmemorypool_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljsmemorypool_p.h b/src/qml/parser/qqmljsmemorypool_p.h
index 3659271bc6..08609e2961 100644
--- a/src/qml/parser/qqmljsmemorypool_p.h
+++ b/src/qml/parser/qqmljsmemorypool_p.h
@@ -94,7 +94,7 @@ public:
inline void *allocate(size_t size)
{
size = (size + 7) & ~7;
- if (_ptr && (_ptr + size < _end)) {
+ if (Q_LIKELY(_ptr && (_ptr + size < _end))) {
void *addr = _ptr;
_ptr += size;
return addr;
@@ -111,7 +111,7 @@ public:
template <typename Tp> Tp *New() { return new (this->allocate(sizeof(Tp))) Tp(); }
private:
- void *allocate_helper(size_t size)
+ Q_NEVER_INLINE void *allocate_helper(size_t size)
{
Q_ASSERT(size < BLOCK_SIZE);