mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
clib: apply clang-tidy fixes to C/C++ code
Summary: Apply some auto-generated clang-tidy fixes to the C/C++ code. This corresponds to Facebook diff D5588668. Test Plan: Confirmed the code still builds and passes tests. Reviewers: #fbhgext, quark Reviewed By: #fbhgext, quark Differential Revision: https://phab.mercurial-scm.org/D509
This commit is contained in:
parent
5afbd505ef
commit
b2e3060a8b
@ -31,7 +31,7 @@ class DeltaChainIterator {
|
||||
std::vector<delta_chain_t> _chains;
|
||||
DeltaChainIterator() :
|
||||
_index(0) {}
|
||||
virtual delta_chain_t getNextChain(const Key &key) {
|
||||
virtual delta_chain_t getNextChain(const Key& /*key*/) {
|
||||
return COMPOUND_LITERAL(delta_chain_t) { GET_DELTA_CHAIN_NOT_FOUND };
|
||||
}
|
||||
public:
|
||||
@ -99,7 +99,7 @@ class DatapackStoreKeyIterator : public KeyIterator {
|
||||
_store(store),
|
||||
_missing(missing) {}
|
||||
|
||||
Key *next();
|
||||
Key *next() override;
|
||||
};
|
||||
|
||||
/* Manages access to a directory of datapack files. */
|
||||
|
@ -21,10 +21,16 @@ class Matcher {
|
||||
class AlwaysMatcher : public Matcher {
|
||||
public:
|
||||
AlwaysMatcher() {}
|
||||
virtual ~AlwaysMatcher() {}
|
||||
virtual bool matches(const std::string &path) { return true; }
|
||||
virtual bool matches(const char *path, const size_t pathlen) { return true; }
|
||||
virtual bool visitdir(const std::string &path) { return true; }
|
||||
~AlwaysMatcher() override {}
|
||||
bool matches(const std::string& /*path*/) override {
|
||||
return true;
|
||||
}
|
||||
bool matches(const char* /*path*/, const size_t /*pathlen*/) override {
|
||||
return true;
|
||||
}
|
||||
bool visitdir(const std::string& /*path*/) override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // FBHGEXT_CSTORE_MATCH_H
|
||||
|
@ -33,14 +33,15 @@ class UnionDatapackStoreKeyIterator : public KeyIterator {
|
||||
_store(store),
|
||||
_missing(missing) {}
|
||||
|
||||
Key *next();
|
||||
Key *next() override;
|
||||
};
|
||||
|
||||
class UnionDeltaChainIterator: public DeltaChainIterator {
|
||||
private:
|
||||
UnionDatapackStore &_store;
|
||||
protected:
|
||||
delta_chain_t getNextChain(const Key &key);
|
||||
delta_chain_t getNextChain(const Key &key) override;
|
||||
|
||||
public:
|
||||
UnionDeltaChainIterator(UnionDatapackStore &store, const Key &key) :
|
||||
DeltaChainIterator(),
|
||||
@ -55,9 +56,9 @@ class UnionDatapackStore : public Store {
|
||||
|
||||
UnionDatapackStore(std::vector<DatapackStore*> stores);
|
||||
|
||||
~UnionDatapackStore();
|
||||
~UnionDatapackStore() override;
|
||||
|
||||
ConstantStringRef get(const Key &key);
|
||||
ConstantStringRef get(const Key &key) override;
|
||||
|
||||
UnionDeltaChainIterator getDeltaChain(const Key &key);
|
||||
|
||||
|
@ -301,10 +301,11 @@ struct GetResult {
|
||||
};
|
||||
|
||||
static FindResult get_callback(
|
||||
Manifest *manifest,
|
||||
const char *filename, size_t filenamelen,
|
||||
FindContext *context,
|
||||
ManifestPtr *resultManifest) {
|
||||
Manifest* manifest,
|
||||
const char* filename,
|
||||
size_t filenamelen,
|
||||
FindContext* context,
|
||||
ManifestPtr* /*resultManifest*/) {
|
||||
GetResult *result = (GetResult *) context->extras;
|
||||
|
||||
// position the iterator at the right location
|
||||
|
Loading…
Reference in New Issue
Block a user