Used single quotes for single character in string::find algorithm, more efficient

This commit is contained in:
asapelkin
2019-10-27 01:55:17 +03:00
committed by wmayer
parent e9814d9183
commit 8bc5b585c8
10 changed files with 11 additions and 11 deletions

View File

@@ -792,7 +792,7 @@ int getSWIGVersionFromModule(const std::string& module)
Py::String file(mod.getAttr("__file__"));
std::string filename = (std::string)file;
// file can have the extension .py or .pyc
filename = filename.substr(0, filename.rfind("."));
filename = filename.substr(0, filename.rfind('.'));
filename += ".py";
boost::regex rx("^# Version ([1-9])\\.([0-9])\\.([0-9]+)");
boost::cmatch what;