Skip to content

Commit

Permalink
Remove commented out code & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozaq committed Dec 11, 2024
1 parent b70c849 commit 43ce247
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 29 deletions.
1 change: 0 additions & 1 deletion src/fdb5/api/local/DumpVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class DumpVisitor : public QueryVisitor<DumpElement> {
bool visitIndexes() override { return false; }
bool visitEntries() override { return false; }

// bool visitDatabase(const Catalogue& catalogue, const Store& store) override {
bool visitDatabase(const Catalogue& catalogue) override {
catalogue.dump(out_, simple_);
return true;
Expand Down
1 change: 0 additions & 1 deletion src/fdb5/api/local/StatusVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class StatusVisitor : public QueryVisitor<StatusElement> {
bool visitIndexes() override { return false; }
bool visitEntries() override { return false; }
bool visitDatabase(const Catalogue& catalogue) override { queue_.emplace(catalogue); return true; }
// bool visitDatabase(const Catalogue& catalogue, const Store& store) override { queue_.emplace(catalogue); return true; }
bool visitIndex(const Index&) override { NOTIMP; }
void visitDatum(const Field&, const Key&) override { NOTIMP; }

Expand Down
2 changes: 1 addition & 1 deletion src/fdb5/api/local/WipeVisitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ WipeVisitor::WipeVisitor(eckit::Queue<WipeElement>& queue,

bool WipeVisitor::visitDatabase(const Catalogue& catalogue) {

// If the DB is locked for wiping, then it "doesn't exist"
// If the Catalogue is locked for wiping, then it "doesn't exist"
if (!catalogue.enabled(ControlIdentifier::Wipe)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/fdb5/database/Catalogue.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Catalogue {

virtual std::vector<eckit::PathName> metadataPaths() const = 0;

virtual void visitEntries(EntryVisitor& visitor, /*const Store& store,*/ bool sorted = false);
virtual void visitEntries(EntryVisitor& visitor, bool sorted = false);

virtual void hideContents() = 0;

Expand Down
3 changes: 1 addition & 2 deletions src/fdb5/database/EntryVisitMechanism.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class FDBVisitException : public eckit::Exception {
EntryVisitor::EntryVisitor() : currentCatalogue_(nullptr), currentStore_(nullptr), currentIndex_(nullptr) {}

EntryVisitor::~EntryVisitor() {
if (currentStore_)
delete currentStore_;
delete currentStore_;
}

Store& EntryVisitor::store() const {
Expand Down
6 changes: 4 additions & 2 deletions src/fdb5/database/EntryVisitMechanism.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ class EntryVisitor : public eckit::NonCopyable {
virtual void visitDatum(const Field& field, const Key& datumKey) = 0;

protected: // members

// n.b. non-owning
/// Non-owning
const Catalogue* currentCatalogue_ = nullptr;
/// Owned store
mutable Store* currentStore_ = nullptr;
/// Non-owning
const Index* currentIndex_ = nullptr;
/// Non-owning
const Rule* rule_ = nullptr;
};

Expand Down
3 changes: 1 addition & 2 deletions src/fdb5/remote/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class Connection : eckit::NonCopyable {
protected: // members

bool single_;
// bool exit_;

private: // members

Expand All @@ -80,4 +79,4 @@ class Connection : eckit::NonCopyable {

//----------------------------------------------------------------------------------------------------------------------

} // namespace fdb5::remote
} // namespace fdb5::remote
6 changes: 3 additions & 3 deletions src/fdb5/remote/client/RemoteCatalogue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ eckit::URI RemoteCatalogue::uri() const {

void RemoteCatalogue::loadSchema() {
// NB we're at the db level, so get the db schema. We will want to get the master schema beforehand.
// (outside of the catalogue)
// (outside of the catalogue)

if (!schema_) {
LOG_DEBUG_LIB(LibFdb5) << "RemoteCatalogue::loadSchema()" << std::endl;
Expand All @@ -129,7 +129,7 @@ void RemoteCatalogue::loadSchema() {
eckit::Buffer keyBuffer(4096);
eckit::MemoryStream keyStream(keyBuffer);
keyStream << dbKey_;

eckit::Buffer buf = controlWriteReadResponse(Message::Schema, generateRequestID(), keyBuffer, keyStream.position());

eckit::MemoryStream s(buf);
Expand All @@ -151,7 +151,7 @@ void RemoteCatalogue::overlayDB(const Catalogue& otherCatalogue, const std::set<
void RemoteCatalogue::index(const Key& key, const eckit::URI& uri, eckit::Offset offset, eckit::Length length) {NOTIMP;}
void RemoteCatalogue::reconsolidate(){NOTIMP;}
std::vector<eckit::PathName> RemoteCatalogue::metadataPaths() const {NOTIMP;}
void RemoteCatalogue::visitEntries(EntryVisitor& visitor, /*const Store& store,*/ bool sorted) {NOTIMP;}
void RemoteCatalogue::visitEntries(EntryVisitor& visitor, bool sorted) {NOTIMP;}
void RemoteCatalogue::dump(std::ostream& out, bool simple, const eckit::Configuration& conf) const {NOTIMP;}
StatsReportVisitor* RemoteCatalogue::statsReportVisitor() const {NOTIMP;}
PurgeVisitor* RemoteCatalogue::purgeVisitor(const Store& store) const {NOTIMP;}
Expand Down
1 change: 0 additions & 1 deletion src/fdb5/remote/server/CatalogueHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ void CatalogueHandler::stores(uint32_t clientID, uint32_t requestID) {

ASSERT(config_.has("stores"));
std::map<std::string, std::vector<eckit::net::Endpoint>> stores;
// std::vector<std::pair<std::string, eckit::net::Endpoint>> stores;
for (const auto& configStore: config_.getSubConfigurations("stores")) {
ASSERT(configStore.has("default"));
eckit::net::Endpoint fieldLocationEndpoint{configStore.getString("default")};
Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/MatchAlways.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class MatchAlways : public Matcher {

void dump(std::ostream& s, const std::string& keyword, const TypesRegistry& registry) const override;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/MatchAny.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class MatchAny : public Matcher{

void dump(std::ostream& s, const std::string& keyword, const TypesRegistry& registry) const override;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/MatchHidden.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class MatchHidden : public Matcher{

void dump(std::ostream& s, const std::string& keyword, const TypesRegistry& registry) const override;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/MatchOptional.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class MatchOptional : public Matcher{

void dump(std::ostream& s, const std::string& keyword, const TypesRegistry& registry) const override;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/MatchValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class MatchValue : public Matcher{

void dump(std::ostream &s, const std::string &keyword, const TypesRegistry &registry) const override;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/Rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class Rule : public eckit::Streamable {
const Schema &schema() const;
const TypesRegistry& registry() const;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

void check(const Key& key) const;

Expand Down
4 changes: 2 additions & 2 deletions src/fdb5/rules/Schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ class Schema : public eckit::Streamable {

const TypesRegistry& registry() const;

const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }
const eckit::ReanimatorBase& reanimator() const override { return reanimator_; }
static const eckit::ClassSpec& classSpec() { return classSpec_; }

private: // methods

Expand Down
1 change: 0 additions & 1 deletion src/fdb5/toc/TocCatalogue.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class TocCatalogue : public CatalogueImpl, public TocHandler {

void checkUID() const override;
bool exists() const override;
// void visitEntries(EntryVisitor& visitor, /*const Store& store,*/ bool sorted) override;
void dump(std::ostream& out, bool simple, const eckit::Configuration& conf) const override;
std::vector<eckit::PathName> metadataPaths() const override;
const Schema& schema() const override;
Expand Down

0 comments on commit 43ce247

Please sign in to comment.