row_cache: pass "const cache_entry" to operator<<
operator<<(..) does not mutate the cache_entry parameter passed to it. also, without this change fmtlib is not able to format given cache_entry parameter, as the caller formatter has "const" specifier. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -1366,7 +1366,7 @@ future<> row_cache::do_update(row_cache::external_updater eu, row_cache::interna
|
||||
});
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, cache_entry& e) {
|
||||
std::ostream& operator<<(std::ostream& out, const cache_entry& e) {
|
||||
return out << "{cache_entry: " << e.position()
|
||||
<< ", cont=" << e.continuous()
|
||||
<< ", dummy=" << e.is_dummy_entry()
|
||||
|
||||
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
bool is_dummy_entry() const noexcept { return _flags._dummy_entry; }
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, cache_entry&);
|
||||
friend std::ostream& operator<<(std::ostream&, const cache_entry&);
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user