summaryrefslogtreecommitdiff
path: root/src/rules/baseclass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rules/baseclass.cpp')
-rw-r--r--src/rules/baseclass.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rules/baseclass.cpp b/src/rules/baseclass.cpp
index c6c06bf..edb339e 100644
--- a/src/rules/baseclass.cpp
+++ b/src/rules/baseclass.cpp
@@ -20,7 +20,7 @@
#include "template.hpp"
-registerRuleExt(baseclass, "006", "(.+)[.](cpp|h)")
+registerRuleExt(baseclass, "006", R"( \.(cpp|h)$ )")
startRule(baseclass)
{
@@ -32,11 +32,8 @@ endRule(baseclass)
parseLineRule(baseclass)
{
- std::smatch m;
if (data.find("friend ") == std::string::npos &&
- isMatch(data, "(.*)(class|struct) (([a-zA-Z_0123456789]+)|"
- "([a-zA-Z_0123456789 ]+)([a-zA-Z_0123456789]+))[:](.*)",
- m))
+ isMatch(data, R"( (class|struct) \s+? [\w\s]+? [^\s] : )"))
{
print("Wrong align after class name and before ':'.");
}