From dda16735b94661b798d6c0fd3e41af944de0a1fe Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周日, 13 10月 2019 15:02:19 +0800
Subject: [PATCH] refactoring - locators

---
 src/library/base/EventRegistry.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/library/base/EventRegistry.cpp b/src/library/base/EventRegistry.cpp
index beefa29..389ee42 100644
--- a/src/library/base/EventRegistry.cpp
+++ b/src/library/base/EventRegistry.cpp
@@ -2,7 +2,7 @@
  * EventRegistry.cpp
  *
  *  Created on: Mar 30, 2014
- *      Author: devel
+ *      
  */
 
 #include "EventRegistry.h"
@@ -10,9 +10,9 @@
 #include <string.h>
 #include <algorithm>
 
+namespace license {
 using namespace std;
 
-namespace license {
 EventRegistry::EventRegistry() {
 }
 
@@ -51,7 +51,7 @@
 }
 
 AuditEvent const * EventRegistry::getLastFailure() const {
-	const AuditEvent* result = NULL;
+	const AuditEvent* result = nullptr;
 	if (logs.size() == 0) {
 		return result;
 	}
@@ -79,7 +79,7 @@
 }
 
 void EventRegistry::addError(EVENT_TYPE event) {
-	addEvent(event, SVRT_ERROR);
+	this->addEvent(event, SVRT_ERROR);
 }
 
 void EventRegistry::addEvent(EVENT_TYPE event, SEVERITY severity) {
@@ -113,7 +113,7 @@
 }
 
 void EventRegistry::exportLastEvents(AuditEvent* auditEvents, int nlogs) {
-	int sizeToCopy = min(nlogs, (int) logs.size());
+	const int sizeToCopy = min(nlogs, (int) logs.size());
 	std::copy(logs.begin(), logs.begin() + sizeToCopy, auditEvents);
 }
 }

--
Gitblit v1.9.1