From bd1a18929833afcc88f170e7a878370b97320900 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 24 Sep 2013 12:37:27 +0100 Subject: [PATCH] [caching] change the emitter->hint value type --- caching/emitter.h | 8 ++++---- caching/restore_emitter.cc | 5 ++++- caching/xml_format.cc | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/caching/emitter.h b/caching/emitter.h index a2a84dc..c70b56e 100644 --- a/caching/emitter.h +++ b/caching/emitter.h @@ -1,11 +1,11 @@ #ifndef CACHE_EMITTER_H #define CACHE_EMITTER_H -#include -#include - #include "persistent-data/block.h" +#include +#include + //---------------------------------------------------------------- namespace caching { @@ -35,7 +35,7 @@ namespace caching { virtual void end_hints() = 0; virtual void hint(pd::block_address cblock, - std::string const &data) = 0; + std::vector const &data) = 0; }; } diff --git a/caching/restore_emitter.cc b/caching/restore_emitter.cc index c705a25..8269ad7 100644 --- a/caching/restore_emitter.cc +++ b/caching/restore_emitter.cc @@ -88,13 +88,16 @@ namespace { } virtual void begin_hints() { + // noop } virtual void end_hints() { + // noop } virtual void hint(pd::block_address cblock, - std::string const &data) { + vector const &data) { + } private: diff --git a/caching/xml_format.cc b/caching/xml_format.cc index 9d0f439..f3b9610 100644 --- a/caching/xml_format.cc +++ b/caching/xml_format.cc @@ -12,12 +12,12 @@ using namespace std; namespace { // base64 encoding? - string encode(string const &data) { - return data; + string encode(vector const &data) { + return ""; } - string decode(string const &data) { - return data; + vector decode(string const &data) { + return vector(); } //-------------------------------- @@ -84,7 +84,7 @@ namespace { } virtual void hint(block_address cblock, - std::string const &data) { + vector const &data) { out_ << "