blob: 7d10461795f4944baf8c89523684549b3c80b805 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- tools_orig/regression/src/library_status.cpp 2012-12-11 15:42:26.000000000 +0100
+++ tools/regression/src/library_status.cpp 2013-07-11 16:15:54.000000000 +0200
@@ -171,16 +171,17 @@
// find_element ------------------------------------------------------------//
+ struct element_equal {
+ const string & m_name;
+ element_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::element_ptr & xep) const {
+ return xep.get()->name == m_name;
+ }
+ };
+
xml::element_list::const_iterator find_element(
const xml::element & root, const string & name
){
- struct element_equal {
- const string & m_name;
- element_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::element_ptr & xep) const {
- return xep.get()->name == m_name;
- }
- };
return std::find_if(
root.elements.begin(),
@@ -203,17 +204,18 @@
// attribute_value ----------------------------------------------------------//
+ struct attribute_equal {
+ const string & m_name;
+ attribute_equal(const string & name) :
+ m_name(name)
+ {}
+ bool operator()(const xml::attribute & a) const {
+ return a.name == m_name;
+ }
+ };
+
const string & attribute_value(
const xml::element & element,
const string & attribute_name
){
- struct attribute_equal {
- const string & m_name;
- attribute_equal(const string & name) :
- m_name(name)
- {}
- bool operator()(const xml::attribute & a) const {
- return a.name == m_name;
- }
- };
xml::attribute_list::const_iterator itr;
itr = std::find_if(
|