chore: C++ google style

This commit is contained in:
huanghongxun
2021-05-30 02:42:39 +08:00
parent 258a6628e4
commit 6d75c4d34f
10 changed files with 276 additions and 302 deletions

View File

@@ -1,17 +1,16 @@
#include "stdafx.h"
#include "Version.h"
#include "version.h"
using namespace std;
Version::Version(const wstring & rawString)
{
int idx = 0;
ver[0] = ver[1] = ver[2] = ver[3] = 0;
for (auto &i : rawString)
{
if (idx >= 4) break;
if (i == '.') ++idx;
else if (i == '_') ++idx;
else if (isdigit(i)) ver[idx] = ver[idx] * 10 + (i - L'0');
}
Version::Version(const std::wstring &rawString) {
int idx = 0;
ver[0] = ver[1] = ver[2] = ver[3] = 0;
for (auto &i : rawString) {
if (idx >= 4) break;
if (i == '.')
++idx;
else if (i == '_')
++idx;
else if (isdigit(i))
ver[idx] = ver[idx] * 10 + (i - L'0');
}
}