From 35df47eaf856f6d4e5b8c570d060f5ccb83a155f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 7 Jul 2018 14:33:16 -0500 Subject: [PATCH] [ox/buffer] Add new log messages to NodeBuffer --- deps/ox/src/ox/ptrarith/nodebuffer.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deps/ox/src/ox/ptrarith/nodebuffer.hpp b/deps/ox/src/ox/ptrarith/nodebuffer.hpp index dc253dce..6510412f 100644 --- a/deps/ox/src/ox/ptrarith/nodebuffer.hpp +++ b/deps/ox/src/ox/ptrarith/nodebuffer.hpp @@ -47,6 +47,10 @@ class __attribute__((packed)) NodeBuffer { return m_current; } + operator ItemPtr() { + return m_current; + } + operator Item*() { return m_current; } @@ -207,7 +211,10 @@ typename NodeBuffer::ItemPtr NodeBuffer::ptr(size_t itemSpace >= item->fullSize()) { return ItemPtr(this, m_header.size, itemOffset, item->fullSize()); } else { - oxTrace("ox::ptrarith::NodeBuffer::ptr::null") << itemOffset; + oxTrace("ox::ptrarith::NodeBuffer::ptr::null") << "itemOffset:" << itemOffset; + oxTrace("ox::ptrarith::NodeBuffer::ptr::null") << "itemOffset >= sizeof(Header):" << (itemOffset >= sizeof(Header)); + oxTrace("ox::ptrarith::NodeBuffer::ptr::null") << "itemSpace >= sizeof(Item):" << (itemSpace >= sizeof(Item)); + oxTrace("ox::ptrarith::NodeBuffer::ptr::null") << "itemSpace >= item->fullSize():" << (itemSpace >= item->fullSize()); return ItemPtr(this, m_header.size, 0, 0); } }