From 956f5dffa76908fe70dffaf9aeee11f057208895 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周二, 22 7月 2014 05:20:33 +0800
Subject: [PATCH] fix compilation for gcc 4.8 & some unit test

---
 src/library/LicenseReader.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/library/LicenseReader.cpp b/src/library/LicenseReader.cpp
index 16662dd..bbddf04 100644
--- a/src/library/LicenseReader.cpp
+++ b/src/library/LicenseReader.cpp
@@ -18,6 +18,7 @@
 #include <fstream>
 #include <sstream>
 #include <stdlib.h>
+#include "pc-identifiers.h"
 #include "LicenseReader.h"
 #include "base/StringUtils.h"
 #include "base/public-key.h"
@@ -68,7 +69,7 @@
 		UserPcIdentifier str_code;
 		strncpy(str_code, client_signature.c_str(), sizeof(str_code));
 		EVENT_TYPE event = validate_user_pc_identifier(str_code);
-		if (event != OK) {
+		if (event != LICENSE_OK) {
 			er.addEvent(event, SEVERITY_ERROR);
 		}
 	}
@@ -149,8 +150,7 @@
 			string client_signature = trim_copy(
 					ini.GetValue(productNamePtr, "client_signature", ""));
 			client_signature.erase(
-					std::remove(client_signature.begin(),
-							client_signature.end(), "-"),
+					std::remove(client_signature.begin(), client_signature.end(), '-'),
 					client_signature.end());
 			int from_sw_version = ini.GetLongValue(productNamePtr,
 					"from_sw_version", FullLicenseInfo::UNUSED_SOFTWARE_VERSION);

--
Gitblit v1.9.1