diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-01-17 23:01:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-01-17 23:02:20 +0300 |
commit | f06a985adff1ec54e7a6c3753d8dfd077b5dd37d (patch) | |
tree | 3cdf5fbc98b47c51205e950110d9a6cd31096e23 /src/stringutils.cpp | |
parent | 1a8ab0421d23125830ba3aac4d8b7910c257be16 (diff) | |
download | mplint-f06a985adff1ec54e7a6c3753d8dfd077b5dd37d.tar.gz mplint-f06a985adff1ec54e7a6c3753d8dfd077b5dd37d.tar.bz2 mplint-f06a985adff1ec54e7a6c3753d8dfd077b5dd37d.tar.xz mplint-f06a985adff1ec54e7a6c3753d8dfd077b5dd37d.zip |
Add checks for A_DEFAULT_COPY / A_DELETE_COPY.
Also fix error in detection for final/notfinal classes.
Diffstat (limited to 'src/stringutils.cpp')
-rw-r--r-- | src/stringutils.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/stringutils.cpp b/src/stringutils.cpp index 1f5ff47..e903941 100644 --- a/src/stringutils.cpp +++ b/src/stringutils.cpp @@ -22,14 +22,12 @@ #include "stringutils.h" -#include <string> #include <algorithm> #include <cctype> #include <cstdarg> #include <cstdio> #include <ctime> #include <list> -#include <regex> #include <sys/stat.h> @@ -708,12 +706,21 @@ void secureChatCommand(std::string &str) str = "_" + str; } -bool isMatch(const std::string &str, const std::string &exp) +bool isMatch(const std::string &str, + const std::string &exp) { std::regex regExp(exp); return std::regex_match(str, regExp); } +bool isMatch(const std::string &str, + const std::string &exp, + std::smatch &m) +{ + std::regex regExp(exp); + return std::regex_match(str, m, regExp); +} + bool fileExists(const std::string &name) { struct stat statbuf; |