@@ -8,6 +8,7 @@ class Principal
8
8
inline explicit Principal (const std::string& principal)
9
9
{
10
10
m_identifier = principal;
11
+ std::transform (m_identifier.begin (), m_identifier.end (), m_identifier.begin (), ::tolower);
11
12
}
12
13
13
14
inline const std::string& GetIdentifier () const
@@ -17,12 +18,12 @@ class Principal
17
18
18
19
inline bool operator <(const Principal& right) const
19
20
{
20
- return _stricmp ( m_identifier. c_str (), right.m_identifier . c_str ()) < 0 ;
21
+ return m_identifier < right.m_identifier ;
21
22
}
22
23
23
24
inline bool operator ==(const Principal& right) const
24
25
{
25
- return _stricmp ( m_identifier. c_str (), right. m_identifier . c_str ()) == 0 ;
26
+ return m_identifier == right. m_identifier ;
26
27
}
27
28
28
29
private:
@@ -35,6 +36,7 @@ class Object
35
36
inline explicit Object (const std::string& identifier)
36
37
{
37
38
m_identifier = identifier;
39
+ std::transform (m_identifier.begin (), m_identifier.end (), m_identifier.begin (), ::tolower);
38
40
}
39
41
40
42
inline const std::string& GetIdentifier () const
@@ -44,12 +46,12 @@ class Object
44
46
45
47
inline bool operator <(const Object& right) const
46
48
{
47
- return _stricmp ( m_identifier. c_str (), right.m_identifier . c_str ()) < 0 ;
49
+ return m_identifier < right.m_identifier ;
48
50
}
49
51
50
52
inline bool operator ==(const Object& right) const
51
53
{
52
- return _stricmp ( m_identifier. c_str (), right. m_identifier . c_str ()) == 0 ;
54
+ return m_identifier == right. m_identifier ;
53
55
}
54
56
55
57
private:
0 commit comments