@@ -149,7 +149,8 @@ static unsigned long long stringToULL(const std::string &s)
149149 return ret;
150150}
151151
152- static bool startsWith (const std::string &s, const std::string &p)
152+ // TODO: added an undercore since this conflicts with a function of the same name in utils.h from Cppcheck source when building Cppcheck with MSBuild
153+ static bool startsWith_ (const std::string &s, const std::string &p)
153154{
154155 return (s.size () >= p.size ()) && std::equal (p.begin (), p.end (), s.begin ());
155156}
@@ -2346,7 +2347,7 @@ namespace simplecpp {
23462347 std::string windowsPath;
23472348
23482349 std::string::size_type pos = 0 ;
2349- if (cygwinPath.size () >= 11 && startsWith (cygwinPath, " /cygdrive/" )) {
2350+ if (cygwinPath.size () >= 11 && startsWith_ (cygwinPath, " /cygdrive/" )) {
23502351 const unsigned char driveLetter = cygwinPath[10 ];
23512352 if (std::isalpha (driveLetter)) {
23522353 if (cygwinPath.size () == 11 ) {
@@ -2723,7 +2724,7 @@ static std::string toAbsolutePath(const std::string& path) {
27232724
27242725static std::pair<std::string, bool > extractRelativePathFromAbsolute (const std::string& absolutepath) {
27252726 static const std::string prefix = currentDirectory () + " /" ;
2726- if (startsWith (absolutepath, prefix)) {
2727+ if (startsWith_ (absolutepath, prefix)) {
27272728 const std::size_t size = prefix.size ();
27282729 return std::make_pair (absolutepath.substr (size, absolutepath.size () - size), true );
27292730 }
0 commit comments