File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
/* ***********************************************************************************
2
- * Copyright (c) 2023 , xeus-cpp contributors *
2
+ * Copyright (c) 2025 , xeus-cpp contributors *
3
3
* *
4
4
* Distributed under the terms of the BSD 3-Clause License. *
5
5
* *
6
6
* The full license is in the file LICENSE, distributed with this software. *
7
7
************************************************************************************/
8
8
9
+ #include < string>
10
+ #include < fstream>
11
+ #include < utility>
12
+ #include < filesystem>
13
+ #include < regex>
14
+
9
15
#include " xinspect.hpp"
10
16
11
17
#include " clang/Interpreter/CppInterOp.h"
@@ -33,9 +39,13 @@ namespace xcpp
33
39
34
40
bool class_member_predicate::operator ()(pugi::xml_node node) const
35
41
{
36
- auto parent = (static_cast <std::string>(node.attribute (" kind" ).value ()) == " class"
37
- || static_cast <std::string>(node.attribute (" kind" ).value ()) == " struct" )
38
- && static_cast <std::string>(node.child (" name" ).child_value ()) == class_name;
42
+ std::string node_kind = node.attribute (" kind" ).value ();
43
+ std::string node_name = node.child (" name" ).child_value ();
44
+
45
+ bool is_class_or_struct = (node_kind == " class" || node_kind == " struct" );
46
+ bool name_matches = (node_name == class_name);
47
+ bool parent = is_class_or_struct && name_matches;
48
+
39
49
if (parent)
40
50
{
41
51
for (pugi::xml_node child : node.children ())
Original file line number Diff line number Diff line change 1
1
/* ***********************************************************************************
2
- * Copyright (c) 2023, xeus-cpp contributors *
3
- * Copyright (c) 2023, Martin Vassilev *
2
+ * Copyright (c) 2025, xeus-cpp contributors *
4
3
* *
5
4
* Distributed under the terms of the BSD 3-Clause License. *
6
5
* *
You can’t perform that action at this time.
0 commit comments