From fe4494804f5e3a2e25485d32aeb0eb7d2f25732e Mon Sep 17 00:00:00 2001 From: costan Date: Tue, 15 Jan 2019 10:29:55 -0800 Subject: [PATCH] leveldb: Make WriteBatch::ApproximateSize() const. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229395810 --- db/write_batch.cc | 2 +- include/leveldb/write_batch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/write_batch.cc b/db/write_batch.cc index 40eed2e..23eb00f 100644 --- a/db/write_batch.cc +++ b/db/write_batch.cc @@ -39,7 +39,7 @@ void WriteBatch::Clear() { rep_.resize(kHeader); } -size_t WriteBatch::ApproximateSize() { +size_t WriteBatch::ApproximateSize() const { return rep_.size(); } diff --git a/include/leveldb/write_batch.h b/include/leveldb/write_batch.h index 9386ace..9b319f0 100644 --- a/include/leveldb/write_batch.h +++ b/include/leveldb/write_batch.h @@ -52,7 +52,7 @@ class LEVELDB_EXPORT WriteBatch { // // This number is tied to implementation details, and may change across // releases. It is intended for LevelDB usage metrics. - size_t ApproximateSize(); + size_t ApproximateSize() const; // Copies the operations in "source" to this batch. //