Code formatting & TODOs

This commit is contained in:
Sebastian Messmer 2015-04-24 13:42:37 +02:00
parent ef7097a299
commit 03597b9474
4 changed files with 6 additions and 9 deletions

View File

@ -13,7 +13,6 @@ namespace caching {
class PeriodicTask;
//TODO Test
//TODO Also throw blocks out after a timeout
class Cache {
public:

View File

@ -52,7 +52,6 @@ void CachingBlockStore::remove(std::unique_ptr<Block> block) {
}
uint64_t CachingBlockStore::numBlocks() const {
//TODO Add number of NewBlock instances
return _baseBlockStore->numBlocks() + _numNewBlocks;
}

View File

@ -8,7 +8,6 @@
namespace blockstore {
namespace caching {
//TODO Rename this to CachingBlockStore and the other one to something else
//TODO Check that this blockstore allows parallel destructing of blocks (otherwise we won't encrypt blocks in parallel)
class CachingBlockStore: public BlockStore {
public:

View File

@ -23,12 +23,12 @@ public:
virtual uint64_t numBlocks() const = 0;
std::unique_ptr<Block> create(const Data &data) {
std::unique_ptr<Block> block(nullptr);
while(block.get() == nullptr) {
//TODO Copy necessary?
block = tryCreate(createKey(), data.copy());
}
return block;
std::unique_ptr<Block> block(nullptr);
while(block.get() == nullptr) {
//TODO Copy necessary?
block = tryCreate(createKey(), data.copy());
}
return block;
}
};