source: imaps-frontend/node_modules/@parcel/watcher/src/Glob.hh

main
Last change on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 487 bytes
Line 
1#ifndef GLOB_H
2#define GLOB_H
3
4#include <unordered_set>
5#include <regex>
6
7struct Glob {
8 std::size_t mHash;
9 std::string mRaw;
10 #ifndef __wasm32__
11 std::regex mRegex;
12 #endif
13
14 Glob(std::string raw);
15
16 bool operator==(const Glob &other) const {
17 return mHash == other.mHash;
18 }
19
20 bool isIgnored(std::string relative_path) const;
21};
22
23namespace std
24{
25 template <>
26 struct hash<Glob>
27 {
28 size_t operator()(const Glob& g) const {
29 return g.mHash;
30 }
31 };
32}
33
34#endif
Note: See TracBrowser for help on using the repository browser.