From 7c2489cc3dc798484e11a449fd0e305210de901b Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 14 12月 2019 20:12:41 +0800 Subject: [PATCH] fix codacy warnings --- src/library/base/EventRegistry.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/library/base/EventRegistry.h b/src/library/base/EventRegistry.h index af5389b..23a53a5 100644 --- a/src/library/base/EventRegistry.h +++ b/src/library/base/EventRegistry.h @@ -8,7 +8,8 @@ #ifndef EVENTREGISTRY_H_ #define EVENTREGISTRY_H_ -#include "../api/datatypes.h" +#include <licensecc/datatypes.h> + #include <vector> #include <map> #include <set> @@ -22,21 +23,21 @@ */ class EventRegistry { private: - friend EventRegistry& operator<<(EventRegistry&, AuditEvent&); - friend EventRegistry& operator<<(EventRegistry&, EventRegistry&); - friend std::ostream & operator << (std::ostream &out, const EventRegistry &er); + friend EventRegistry &operator<<(EventRegistry &, AuditEvent &); + friend EventRegistry &operator<<(EventRegistry &, EventRegistry &); + friend std::ostream &operator<<(std::ostream &out, const EventRegistry &er); std::vector<AuditEvent> logs; /** * For every license keep track of the events who progressed most * in the validation process */ - std::map<std::string,size_t> mostAdvancedLogIdx_by_LicenseId; + std::map<std::string, size_t> mostAdvancedLogIdx_by_LicenseId; int current_validation_step; public: EventRegistry(); - //operator << + // operator << void append(const EventRegistry &eventRegistry); /** * Turn the event warning for the license with the most advanced status @@ -50,11 +51,10 @@ * for the license with the most advanced status. * @return NULL if no failures are found. */ - AuditEvent const* getLastFailure() const; + const AuditEvent *getLastFailure() const; void addEvent(EVENT_TYPE event, const std::string &licenseLocationId); - void addEvent(EVENT_TYPE event, const char *licenseLocationId = nullptr, - const char *info = nullptr); + void addEvent(EVENT_TYPE event, const char *licenseLocationId = nullptr, const char *info = nullptr); void exportLastEvents(AuditEvent *auditEvents, int nlogs); }; -} +} // namespace license #endif /* EVENTREGISTRY_H_ */ -- Gitblit v1.9.1