Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
35 lines
509 B
Plaintext
35 lines
509 B
Plaintext
#ifndef GLOB_H
|
|
#define GLOB_H
|
|
|
|
#include <unordered_set>
|
|
#include <regex>
|
|
|
|
struct Glob {
|
|
std::size_t mHash;
|
|
std::string mRaw;
|
|
#ifndef __wasm32__
|
|
std::regex mRegex;
|
|
#endif
|
|
|
|
Glob(std::string raw);
|
|
|
|
bool operator==(const Glob &other) const {
|
|
return mHash == other.mHash && mRaw == other.mRaw;
|
|
}
|
|
|
|
bool isIgnored(std::string relative_path) const;
|
|
};
|
|
|
|
namespace std
|
|
{
|
|
template <>
|
|
struct hash<Glob>
|
|
{
|
|
size_t operator()(const Glob& g) const {
|
|
return g.mHash;
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif
|