@@ -47,28 +47,21 @@ namespace transaction {
4747 * We have to have a better hash function, maybe based on the std::hash.
4848 *
4949 */
50- struct MyEqual
51- {
52- bool operator ()(const std::string& Left, const std::string& Right) const
53- {
50+ struct MyEqual {
51+ bool operator ()(const std::string& Left, const std::string& Right) const {
5452 return Left.size () == Right.size ()
55- && std::equal ( Left.begin () , Left.end () , Right.begin (),
56- []( char a , char b )
57- {
53+ && std::equal (Left.begin (), Left.end (), Right.begin (),
54+ [](char a, char b) {
5855 return tolower (a) == tolower (b);
59- }
60- );
56+ });
6157 }
6258};
6359
64- struct MyHash
65- {
66- size_t operator ()(const std::string& Keyval) const
67- {
68- // You might need a better hash function than this
60+ struct MyHash {
61+ size_t operator ()(const std::string& Keyval) const {
62+ // You might need a better hash function than this
6963 size_t h = 0 ;
70- std::for_each ( Keyval.begin () , Keyval.end () , [&](char c )
71- {
64+ std::for_each (Keyval.begin (), Keyval.end (), [&](char c) {
7265 h += tolower (c);
7366 });
7467 return h;
@@ -92,14 +85,12 @@ class Variables :
9285
9386 std::string* resolveFirst (const std::string& var);
9487
95-
9688 void resolveSingleMatch (const std::string& var,
9789 std::vector<const transaction::Variable *> *l);
9890 void resolveMultiMatches (const std::string& var,
9991 std::vector<const transaction::Variable *> *l);
10092 void resolveRegularExpression (const std::string& var,
10193 std::vector<const transaction::Variable *> *l);
102-
10394};
10495
10596} // namespace transaction
0 commit comments