11 |
|
|
12 |
|
bool Pattern::operator==(const Pattern& o) const |
13 |
|
{ |
14 |
< |
unsigned int thissize = theData.size(); |
15 |
< |
if (thissize != o.size()) return false; |
14 |
> |
unsigned int thissize = theData.size(); |
15 |
> |
if (thissize != o.size()) return false; |
16 |
> |
|
17 |
|
for (unsigned int idx=0; idx<thissize; idx++) { |
18 |
|
if (theData[idx].first != o.theData[idx].first) return false; |
19 |
|
if (theData[idx].second != o.theData[idx].second) return false; |
20 |
|
} |
21 |
+ |
|
22 |
|
return true; |
23 |
|
} |
24 |
|
|
25 |
|
Pattern Pattern::addOrCopy( std::pair<uint32_t, unsigned int > aData) |
26 |
|
{ |
27 |
+ |
|
28 |
|
for (unsigned int idx=0; idx < theData.size(); ++idx) { |
29 |
|
if (theData[idx].first == aData.first) { |
30 |
|
Pattern modified = *this; |