Fixed order for NBLog::FormatEntry::begin()
Test: dumpsys media.log
Change-Id: I9579e8d41a5fd97b4c9c3b697bd8c13ee3b8c295
diff --git a/media/libnbaio/NBLog.cpp b/media/libnbaio/NBLog.cpp
index 5413007..263a201 100644
--- a/media/libnbaio/NBLog.cpp
+++ b/media/libnbaio/NBLog.cpp
@@ -72,6 +72,10 @@
// ---------------------------------------------------------------------------
+NBLog::EntryIterator NBLog::FormatEntry::begin() const {
+ return EntryIterator(mEntry);
+}
+
const char *NBLog::FormatEntry::formatString() const {
return (const char*) mEntry + offsetof(entry, data);
}
@@ -165,10 +169,6 @@
memcpy((void*) dst, ptr + offsetof(entry, data), ptr[offsetof(entry, length)]);
}
-NBLog::EntryIterator NBLog::FormatEntry::begin() const {
- return EntryIterator(mEntry);
-}
-
NBLog::EntryIterator::EntryIterator()
: ptr(nullptr) {}
diff --git a/media/libnbaio/include/NBLog.h b/media/libnbaio/include/NBLog.h
index 19232ff..c573dc9 100644
--- a/media/libnbaio/include/NBLog.h
+++ b/media/libnbaio/include/NBLog.h
@@ -167,6 +167,8 @@
explicit FormatEntry(const uint8_t *ptr) : AbstractEntry(ptr) {}
virtual ~FormatEntry() {}
+ EntryIterator begin() const;
+
// Entry's format string
const char* formatString() const;
@@ -191,7 +193,6 @@
virtual EntryIterator copyWithAuthor(std::unique_ptr<audio_utils_fifo_writer> &dst,
int author) const override;
- EntryIterator begin() const;
};
class HistogramEntry : public AbstractEntry {