diff --git a/lib/api/AuthTokensController.cpp b/lib/api/AuthTokensController.cpp index 9c6641dc2..13cb3e610 100644 --- a/lib/api/AuthTokensController.cpp +++ b/lib/api/AuthTokensController.cpp @@ -9,7 +9,7 @@ namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_CLASS(AuthTokensController, "EventsSDK.AuthTokensController", "Events telemetry client - AuthTokensController class"); + MATSDK_LOG_INST_COMPONENT_CLASS(AuthTokensController, "EventsSDK.AuthTokensController", "Events telemetry client - AuthTokensController class") AuthTokensController::AuthTokensController() :m_IsStrictModeEnabled(false) diff --git a/lib/api/DataViewerCollection.cpp b/lib/api/DataViewerCollection.cpp index 6334b12a1..92f615ff9 100644 --- a/lib/api/DataViewerCollection.cpp +++ b/lib/api/DataViewerCollection.cpp @@ -8,7 +8,7 @@ namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_CLASS(DataViewerCollection, "EventsSDK.DataViewerCollection", "Microsoft Telemetry Client - DataViewerCollection class"); + MATSDK_LOG_INST_COMPONENT_CLASS(DataViewerCollection, "EventsSDK.DataViewerCollection", "Microsoft Telemetry Client - DataViewerCollection class") void DataViewerCollection::DispatchDataViewerEvent(const std::vector& packetData) const noexcept { @@ -21,7 +21,7 @@ namespace MAT_NS_BEGIN { // Task 3568800: Integrate ThreadPool to IDataViewerCollection viewer->ReceiveData(packetData); } - }; + } void DataViewerCollection::RegisterViewer(const std::shared_ptr& dataViewer) { diff --git a/lib/api/DataViewerCollection.hpp b/lib/api/DataViewerCollection.hpp index 545501912..a711dbe50 100644 --- a/lib/api/DataViewerCollection.hpp +++ b/lib/api/DataViewerCollection.hpp @@ -31,7 +31,7 @@ namespace MAT_NS_BEGIN { virtual bool IsViewerRegistered(const char* viewerName) const override; - virtual ~DataViewerCollection() noexcept {}; + virtual ~DataViewerCollection() noexcept {} private: MATSDK_LOG_DECL_COMPONENT_CLASS(); diff --git a/lib/api/IRuntimeConfig.hpp b/lib/api/IRuntimeConfig.hpp index 1712e56e4..201b9aef5 100644 --- a/lib/api/IRuntimeConfig.hpp +++ b/lib/api/IRuntimeConfig.hpp @@ -192,7 +192,7 @@ namespace MAT_NS_BEGIN /// Provider Group Id virtual const char* GetProviderGroupId() = 0; - virtual ~IRuntimeConfig() {}; + virtual ~IRuntimeConfig() {} }; /// @endcond diff --git a/lib/api/LogManagerImpl.cpp b/lib/api/LogManagerImpl.cpp index a3a28bf50..94b95bda7 100644 --- a/lib/api/LogManagerImpl.cpp +++ b/lib/api/LogManagerImpl.cpp @@ -102,7 +102,7 @@ namespace MAT_NS_BEGIN return true; } - MATSDK_LOG_INST_COMPONENT_CLASS(LogManagerImpl, "EventsSDK.LogManager", "Microsoft Telemetry Client - LogManager class"); + MATSDK_LOG_INST_COMPONENT_CLASS(LogManagerImpl, "EventsSDK.LogManager", "Microsoft Telemetry Client - LogManager class") #if 1 // TODO: integrate Tracing API from v1 @@ -348,7 +348,7 @@ namespace MAT_NS_BEGIN client->SetMsRootCheck(m_logConfiguration[CFG_MAP_HTTP][CFG_BOOL_HTTP_MS_ROOT_CHECK]); } #endif - }; + } LogManagerImpl::~LogManagerImpl() noexcept { @@ -507,7 +507,7 @@ namespace MAT_NS_BEGIN const std::string& LogManagerImpl::GetTransmitProfileName() { return TransmitProfiles::getProfile(); - }; + } ISemanticContext& LogManagerImpl::GetSemanticContext() { @@ -665,7 +665,7 @@ namespace MAT_NS_BEGIN void LogManagerImpl::AddEventListener(DebugEventType type, DebugEventListener& listener) { m_debugEventSource.AddEventListener(type, listener); - }; + } /// /// Removes the event listener. @@ -675,7 +675,7 @@ namespace MAT_NS_BEGIN void LogManagerImpl::RemoveEventListener(DebugEventType type, DebugEventListener& listener) { m_debugEventSource.RemoveEventListener(type, listener); - }; + } /// /// Dispatches the event. @@ -685,7 +685,7 @@ namespace MAT_NS_BEGIN bool LogManagerImpl::DispatchEvent(DebugEvent evt) { return m_debugEventSource.DispatchEvent(std::move(evt)); - }; + } /// Attach cascaded DebugEventSource to forward all events to bool LogManagerImpl::AttachEventSource(DebugEventSource& other) diff --git a/lib/api/LogManagerImpl.hpp b/lib/api/LogManagerImpl.hpp index 42f47f2d5..45f042535 100644 --- a/lib/api/LogManagerImpl.hpp +++ b/lib/api/LogManagerImpl.hpp @@ -182,7 +182,7 @@ namespace MAT_NS_BEGIN { const std::string val(value); return SetContext(name, val, piiKind); - }; + } virtual inline status_t SetContext(const std::string& name, int8_t value, PiiKind piiKind = PiiKind_None) override { diff --git a/lib/api/Logger.cpp b/lib/api/Logger.cpp index 8338773f0..6d8b5147e 100644 --- a/lib/api/Logger.cpp +++ b/lib/api/Logger.cpp @@ -170,37 +170,37 @@ namespace MAT_NS_BEGIN void Logger::SetContext(const std::string& k, const char v[], PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, const std::string& v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, double v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, int64_t v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, time_ticks_t v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, GUID_t v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } void Logger::SetContext(const std::string& k, bool v, PiiKind pii) { SetContext(k, EventProperty(v, pii)); - }; + } // The goal of this method is to rewire the logger instance to any other ISemanticContext issued by SDK. // SDK may provide a future option for a guest logger to opt-in into its own semantic context. The method will then diff --git a/lib/config/RuntimeConfig_Default.hpp b/lib/config/RuntimeConfig_Default.hpp index 8d3049752..95c2b161e 100644 --- a/lib/config/RuntimeConfig_Default.hpp +++ b/lib/config/RuntimeConfig_Default.hpp @@ -104,7 +104,7 @@ namespace MAT_NS_BEGIN config(customConfig) { Variant::merge_map(*customConfig, *defaultRuntimeConfig()); - }; + } virtual ~RuntimeConfig_Default() { @@ -125,14 +125,14 @@ namespace MAT_NS_BEGIN UNREFERENCED_PARAMETER(extension); UNREFERENCED_PARAMETER(experimentationProject); UNREFERENCED_PARAMETER(eventName); - }; + } virtual EventLatency GetEventLatency(std::string const& tenantId = std::string(), std::string const& eventName = std::string()) override { UNREFERENCED_PARAMETER(tenantId); UNREFERENCED_PARAMETER(eventName); return EventLatency_Normal; - }; + } virtual std::string GetMetaStatsTenantToken() override { @@ -144,7 +144,7 @@ namespace MAT_NS_BEGIN return std::string(token); } return std::string(defaultToken); - }; + } virtual unsigned GetMetaStatsSendIntervalSec() override { @@ -154,7 +154,7 @@ namespace MAT_NS_BEGIN virtual unsigned GetOfflineStorageMaximumSizeBytes() override { return config[CFG_INT_CACHE_FILE_SIZE]; - }; + } virtual unsigned GetOfflineStorageResizeThresholdPct() override { diff --git a/lib/decorators/BaseDecorator.hpp b/lib/decorators/BaseDecorator.hpp index 6f6faba8e..42346534c 100644 --- a/lib/decorators/BaseDecorator.hpp +++ b/lib/decorators/BaseDecorator.hpp @@ -24,7 +24,7 @@ namespace MAT_NS_BEGIN public: BaseDecorator(ILogManager& owner); - virtual ~BaseDecorator() {}; + virtual ~BaseDecorator() {} bool decorate(CsProtocol::Record& record); protected: diff --git a/lib/decorators/EventPropertiesDecorator.hpp b/lib/decorators/EventPropertiesDecorator.hpp index cedd6a28d..0c7a3d9c5 100644 --- a/lib/decorators/EventPropertiesDecorator.hpp +++ b/lib/decorators/EventPropertiesDecorator.hpp @@ -53,7 +53,7 @@ namespace MAT_NS_BEGIN { // randomLocalId = "r:"; randomLocalId+= PAL::generateUuidString(); - }; + } void dropPiiPartA(::CsProtocol::Record& record) { diff --git a/lib/decorators/SemanticApiDecorators.hpp b/lib/decorators/SemanticApiDecorators.hpp index 0ed9fd6f8..450643c19 100644 --- a/lib/decorators/SemanticApiDecorators.hpp +++ b/lib/decorators/SemanticApiDecorators.hpp @@ -16,7 +16,7 @@ namespace MAT_NS_BEGIN { class SemanticApiDecorators : public BaseDecorator { public: - SemanticApiDecorators(ILogManager& owner) : BaseDecorator(owner) {}; + SemanticApiDecorators(ILogManager& owner) : BaseDecorator(owner) {} bool decorateAggregatedMetricMessage(::CsProtocol::Record& record, AggregatedMetricData const& metricData) { diff --git a/lib/http/HttpClientFactory.cpp b/lib/http/HttpClientFactory.cpp index eb7569142..fac2a446a 100644 --- a/lib/http/HttpClientFactory.cpp +++ b/lib/http/HttpClientFactory.cpp @@ -33,7 +33,7 @@ namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_CLASS(HttpClientFactory, "EventsSDK.HttpClientFactory", "Events telemetry client - HttpClientFactory class"); + MATSDK_LOG_INST_COMPONENT_CLASS(HttpClientFactory, "EventsSDK.HttpClientFactory", "Events telemetry client - HttpClientFactory class") #if defined(MATSDK_PAL_WIN32) #ifdef _WINRT_DLL diff --git a/lib/http/HttpClientManager.cpp b/lib/http/HttpClientManager.cpp index 8216b1765..a6202aa9c 100644 --- a/lib/http/HttpClientManager.cpp +++ b/lib/http/HttpClientManager.cpp @@ -61,7 +61,7 @@ namespace MAT_NS_BEGIN { // as well pass the data back by updating the data structure. DebugEvent evt(EVT_HTTP_STATE, size_t(state), 0, data, size); m_hcm.m_logManager.DispatchEvent(evt); - }; + } virtual ~HttpCallback() diff --git a/lib/http/HttpClient_WinInet.cpp b/lib/http/HttpClient_WinInet.cpp index ce950853e..d362aed87 100644 --- a/lib/http/HttpClient_WinInet.cpp +++ b/lib/http/HttpClient_WinInet.cpp @@ -538,7 +538,7 @@ void HttpClient_WinInet::CancelAllRequests() PAL::sleep(100); std::this_thread::yield(); } -}; +} /// /// Enforces MS-root server certificate check. diff --git a/lib/include/mat/IDeviceInformation.hpp b/lib/include/mat/IDeviceInformation.hpp index 6a39c3dad..4032b0858 100644 --- a/lib/include/mat/IDeviceInformation.hpp +++ b/lib/include/mat/IDeviceInformation.hpp @@ -24,7 +24,7 @@ namespace PAL_NS_BEGIN { { public: - virtual ~IDeviceInformation() {}; + virtual ~IDeviceInformation() {} /// /// Gets the unique ID of the current device diff --git a/lib/include/mat/INetworkInformation.hpp b/lib/include/mat/INetworkInformation.hpp index eac021cc3..6472d9fe0 100644 --- a/lib/include/mat/INetworkInformation.hpp +++ b/lib/include/mat/INetworkInformation.hpp @@ -27,7 +27,7 @@ namespace PAL_NS_BEGIN { { public: - virtual ~INetworkInformation() {}; + virtual ~INetworkInformation() {} /// /// Gets the current network provider for the device diff --git a/lib/include/mat/ISystemInformation.hpp b/lib/include/mat/ISystemInformation.hpp index a4c5ef29d..e002206f6 100644 --- a/lib/include/mat/ISystemInformation.hpp +++ b/lib/include/mat/ISystemInformation.hpp @@ -16,7 +16,7 @@ namespace PAL_NS_BEGIN { { public: - virtual ~ISystemInformation() {}; + virtual ~ISystemInformation() {} /// /// Gets the App ID. diff --git a/lib/include/public/CAPIClient.hpp b/lib/include/public/CAPIClient.hpp index a9fc632fa..9dc33e6ef 100644 --- a/lib/include/public/CAPIClient.hpp +++ b/lib/include/public/CAPIClient.hpp @@ -47,7 +47,7 @@ namespace MAT_NS_BEGIN { handle = evt_open(config); return handle; - }; + } evt_status_t configure(const char* config) { diff --git a/lib/include/public/CommonFields.h b/lib/include/public/CommonFields.h index 2bd7d1689..77c303be9 100644 --- a/lib/include/public/CommonFields.h +++ b/lib/include/public/CommonFields.h @@ -118,6 +118,6 @@ virtual void SETTER_METHOD (name) (const std::string & x) \ { \ SetCommonField(placeholder, x); \ - }; + } #endif diff --git a/lib/include/public/DebugEvents.hpp b/lib/include/public/DebugEvents.hpp index 36c354f4b..5b44a7e55 100644 --- a/lib/include/public/DebugEvents.hpp +++ b/lib/include/public/DebugEvents.hpp @@ -158,12 +158,12 @@ namespace MAT_NS_BEGIN size_t size; /// DebugEvent The default DebugEvent constructor. - DebugEvent() : seq(0), ts(0), type(EVT_UNKNOWN), param1(0), param2(0), data(NULL), size(0) {}; + DebugEvent() : seq(0), ts(0), type(EVT_UNKNOWN), param1(0), param2(0), data(NULL), size(0) {} - DebugEvent(DebugEventType type) : seq(0), ts(0), type(type), param1(0), param2(0), data(NULL), size(0) {}; + DebugEvent(DebugEventType type) : seq(0), ts(0), type(type), param1(0), param2(0), data(NULL), size(0) {} DebugEvent(DebugEventType type, size_t param1, size_t param2 = 0, void* data = nullptr, size_t size = 0) : - seq(0), ts(0), type(type), param1(param1), param2(param2), data(data), size(size) {}; + seq(0), ts(0), type(type), param1(param1), param2(param2), data(data), size(size) {} }; /// diff --git a/lib/include/public/IHttpClient.hpp b/lib/include/public/IHttpClient.hpp index 7fe96ba0b..81f348056 100644 --- a/lib/include/public/IHttpClient.hpp +++ b/lib/include/public/IHttpClient.hpp @@ -494,7 +494,7 @@ namespace MAT_NS_BEGIN std::ignore = state; std::ignore = data; std::ignore = size; - }; + } }; /// @@ -542,7 +542,7 @@ namespace MAT_NS_BEGIN /// A string that contains the ID of the request to cancel. virtual void CancelRequestAsync(std::string const& id) = 0; - virtual void CancelAllRequests() {}; + virtual void CancelAllRequests() {} }; /// @endcond diff --git a/lib/include/public/IModule.hpp b/lib/include/public/IModule.hpp index 42aa37994..2612ae66d 100644 --- a/lib/include/public/IModule.hpp +++ b/lib/include/public/IModule.hpp @@ -27,13 +27,13 @@ namespace MAT_NS_BEGIN /// Initializes the module. /// Invoked as part of parent ILogManager is constructed. /// - virtual void Initialize(ILogManager*) noexcept {}; + virtual void Initialize(ILogManager*) noexcept {} /// /// Tears down the module. /// Invoked as part of parent ILogManager's FlushAndTeardown() method. /// - virtual void Teardown() noexcept {}; + virtual void Teardown() noexcept {} }; /// @endcond diff --git a/lib/include/public/IOfflineStorage.hpp b/lib/include/public/IOfflineStorage.hpp index 75fc13f0e..d08d24148 100644 --- a/lib/include/public/IOfflineStorage.hpp +++ b/lib/include/public/IOfflineStorage.hpp @@ -335,7 +335,7 @@ namespace MAT_NS_BEGIN { virtual bool ResizeDb() = 0; - virtual void ReleaseAllRecords() {}; + virtual void ReleaseAllRecords() {} }; diff --git a/lib/include/public/ISemanticContext.hpp b/lib/include/public/ISemanticContext.hpp index 5c2166790..4a71e11a1 100644 --- a/lib/include/public/ISemanticContext.hpp +++ b/lib/include/public/ISemanticContext.hpp @@ -19,43 +19,43 @@ namespace MAT_NS_BEGIN class MATSDK_LIBABI ISemanticContext { public: - virtual ~ISemanticContext() {}; + virtual ~ISemanticContext() {} /// /// Set the application environment context information of telemetry event. /// /// Environment from which this event originated - DECLARE_COMMONFIELD(AppEnv, COMMONFIELDS_APP_ENV); + DECLARE_COMMONFIELD(AppEnv, COMMONFIELDS_APP_ENV) /// /// Set the application identifier context information of telemetry event. /// /// Id that uniquely identifies the user-facing application from which this event originated - DECLARE_COMMONFIELD(AppId, COMMONFIELDS_APP_ID); + DECLARE_COMMONFIELD(AppId, COMMONFIELDS_APP_ID) /// /// Set the application name context information of telemetry event. /// /// Application Name - DECLARE_COMMONFIELD(AppName, COMMONFIELDS_APP_NAME); + DECLARE_COMMONFIELD(AppName, COMMONFIELDS_APP_NAME) /// /// Set the application version context information of telemetry event. /// /// Version of the application, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(AppVersion, COMMONFIELDS_APP_VERSION); + DECLARE_COMMONFIELD(AppVersion, COMMONFIELDS_APP_VERSION) /// /// Set the application language context information of telemetry event. /// - DECLARE_COMMONFIELD(AppLanguage, COMMONFIELDS_APP_LANGUAGE); + DECLARE_COMMONFIELD(AppLanguage, COMMONFIELDS_APP_LANGUAGE) /// /// Set the application's experiment IDs information of telemetry event. /// The experiment IDs information will be applied to all events unless it is overwritten by that set via SetEventExperimentIds /// /// list of IDs of experimentations into which the application is enlisted - DECLARE_COMMONFIELD(AppExperimentIds, COMMONFIELDS_APP_EXPERIMENTIDS); + DECLARE_COMMONFIELD(AppExperimentIds, COMMONFIELDS_APP_EXPERIMENTIDS) /// /// Set the application version context information of telemetry event. @@ -66,54 +66,54 @@ namespace MAT_NS_BEGIN { SetCommonField(COMMONFIELDS_APP_EXPERIMENTETAG, appExperimentETag); ClearExperimentIds(); - }; + } /// /// Set the application experimentation impression id information of telemetry event. /// /// List of expementation IDs which are app/platform specific - DECLARE_COMMONFIELD(AppExperimentImpressionId, SESSION_IMPRESSION_ID); + DECLARE_COMMONFIELD(AppExperimentImpressionId, SESSION_IMPRESSION_ID) /// /// Set the experiment IDs information of the specified telemetry event. /// /// list of IDs of experimentations into which the application is enlisted - virtual void SetEventExperimentIds(std::string const& /*eventName*/, std::string const& /*experimentIds*/) {}; + virtual void SetEventExperimentIds(std::string const& /*eventName*/, std::string const& /*experimentIds*/) {} /// /// Clear the experiment IDs information. /// - virtual void ClearExperimentIds() {}; + virtual void ClearExperimentIds() {} /// /// Set the device identifier context information of telemetry event. /// /// A unique device identifier, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(DeviceId, COMMONFIELDS_DEVICE_ID); + DECLARE_COMMONFIELD(DeviceId, COMMONFIELDS_DEVICE_ID) /// /// Set the device manufacturer context information of telemetry event. /// /// The manufacturer of the device, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(DeviceMake, COMMONFIELDS_DEVICE_MAKE); + DECLARE_COMMONFIELD(DeviceMake, COMMONFIELDS_DEVICE_MAKE) /// /// Set the device model context information of telemetry event. /// /// The model of the device, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(DeviceModel, COMMONFIELDS_DEVICE_MODEL); + DECLARE_COMMONFIELD(DeviceModel, COMMONFIELDS_DEVICE_MODEL) /// /// Set the device class context information of telemetry event. /// /// Device class. - DECLARE_COMMONFIELD(DeviceClass, COMMONFIELDS_DEVICE_CLASS); + DECLARE_COMMONFIELD(DeviceClass, COMMONFIELDS_DEVICE_CLASS) /// /// Set the device orgId context information of telemetry event. /// /// Device orgId - DECLARE_COMMONFIELD(DeviceOrgId, COMMONFIELDS_DEVICE_ORGID); + DECLARE_COMMONFIELD(DeviceOrgId, COMMONFIELDS_DEVICE_ORGID) /// /// Set the network cost context information of telemetry event. @@ -153,7 +153,7 @@ namespace MAT_NS_BEGIN /// Set the network provider context information of telemetry event. /// /// The provider used to connect to the current network, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(NetworkProvider, COMMONFIELDS_NETWORK_PROVIDER); + DECLARE_COMMONFIELD(NetworkProvider, COMMONFIELDS_NETWORK_PROVIDER) /// Set the network type context information of telemetry event. /// @@ -192,19 +192,19 @@ namespace MAT_NS_BEGIN /// Set the system name context information of telemetry event. /// /// The system anme, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(OsName, COMMONFIELDS_OS_NAME); + DECLARE_COMMONFIELD(OsName, COMMONFIELDS_OS_NAME) /// /// Set the system version context information of telemetry event. /// /// The system version, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(OsVersion, COMMONFIELDS_OS_VERSION); + DECLARE_COMMONFIELD(OsVersion, COMMONFIELDS_OS_VERSION) /// /// Set the system build number context information of telemetry event. /// /// The system build, retrieved programmatically where possible and is app/platform specific - DECLARE_COMMONFIELD(OsBuild, COMMONFIELDS_OS_BUILD); + DECLARE_COMMONFIELD(OsBuild, COMMONFIELDS_OS_BUILD) /// /// Set the userId context information of telemetry event. @@ -221,58 +221,58 @@ namespace MAT_NS_BEGIN /// Set the user MsaId context information of telemetry event. /// /// Msa id that identifies a user in the application-specific user namespace - DECLARE_COMMONFIELD(UserMsaId, COMMONFIELDS_USER_MSAID); + DECLARE_COMMONFIELD(UserMsaId, COMMONFIELDS_USER_MSAID) /// /// Set the user ANID context information of telemetry event. /// /// ANID that identifies a user in in the application-specific user namespace - DECLARE_COMMONFIELD(UserANID, COMMONFIELDS_USER_ANID); + DECLARE_COMMONFIELD(UserANID, COMMONFIELDS_USER_ANID) /// /// Set the advertising Id context information of telemetry event. /// /// Advertising Id of a user to use in an application-specific user namespace - DECLARE_COMMONFIELD(UserAdvertisingId, COMMONFIELDS_USER_ADVERTISINGID); + DECLARE_COMMONFIELD(UserAdvertisingId, COMMONFIELDS_USER_ADVERTISINGID) /// /// Set the user language context information of telemetry event. /// /// user's language in IETF language tag format, as described in RFC 4646. - DECLARE_COMMONFIELD(UserLanguage, COMMONFIELDS_USER_LANGUAGE); + DECLARE_COMMONFIELD(UserLanguage, COMMONFIELDS_USER_LANGUAGE) /// /// Set the user time zone context information of telemetry event. /// /// user's time zone relative to UTC, in ISO 8601 time zone format - DECLARE_COMMONFIELD(UserTimeZone, COMMONFIELDS_USER_TIMEZONE); + DECLARE_COMMONFIELD(UserTimeZone, COMMONFIELDS_USER_TIMEZONE) /// /// Set the Commercial Id context information of telemetry event. /// /// CommercialId of a machine - DECLARE_COMMONFIELD(CommercialId, COMMONFIELDS_COMMERCIAL_ID); + DECLARE_COMMONFIELD(CommercialId, COMMONFIELDS_COMMERCIAL_ID) /// /// Sets the common Part A/B field. /// /// Field name /// Field value. - virtual void SetCommonField(const std::string &, const EventProperty &) {}; + virtual void SetCommonField(const std::string &, const EventProperty &) {} /// /// Sets the custom Part C field. /// /// Field name /// Field value. - virtual void SetCustomField(const std::string &, const EventProperty &) {}; + virtual void SetCustomField(const std::string &, const EventProperty &) {} /// /// Sets the ticket (device ticket, user id ticket, etc.) for secure token validation. /// /// Ticket type /// Ticket value. - virtual void SetTicket(TicketType /*type*/, std::string const& /*ticketValue*/) {}; + virtual void SetTicket(TicketType /*type*/, std::string const& /*ticketValue*/) {} }; } MAT_NS_END diff --git a/lib/include/public/ITaskDispatcher.hpp b/lib/include/public/ITaskDispatcher.hpp index 5cb44e280..69da41cff 100644 --- a/lib/include/public/ITaskDispatcher.hpp +++ b/lib/include/public/ITaskDispatcher.hpp @@ -61,7 +61,7 @@ namespace MAT_NS_BEGIN Task() : tid(GetNewTid()) - {}; + {} /// /// The time (in milliseconds since epoch) when this work item should be executed diff --git a/lib/include/public/LogManagerProvider.hpp b/lib/include/public/LogManagerProvider.hpp index 7535e37cf..a7c5df812 100644 --- a/lib/include/public/LogManagerProvider.hpp +++ b/lib/include/public/LogManagerProvider.hpp @@ -50,7 +50,7 @@ namespace MAT_NS_BEGIN cfg["sdkVersion"] = targetVersion; // TODO: SDK internally should convert this to semver cfg[CFG_MAP_FACTORY_CONFIG][CFG_STR_FACTORY_HOST] = (wantController) ? id : "*"; return Get(cfg, status); - }; + } #if 0 /* This method must be deprecated. Customers to use this method instead: diff --git a/lib/include/public/NullObjects.hpp b/lib/include/public/NullObjects.hpp index 4505ba00e..f324229e3 100644 --- a/lib/include/public/NullObjects.hpp +++ b/lib/include/public/NullObjects.hpp @@ -15,17 +15,17 @@ namespace MAT_NS_BEGIN { public: - virtual void SetNetworkCost(NetworkCost /*networkCost*/) override {}; + virtual void SetNetworkCost(NetworkCost /*networkCost*/) override {} - virtual void SetNetworkType(NetworkType /*networkType*/) override {}; + virtual void SetNetworkType(NetworkType /*networkType*/) override {} - virtual void SetUserId(const std::string & /*userId*/, PiiKind /*piiKind*/ = PiiKind_Identity) override { }; + virtual void SetUserId(const std::string & /*userId*/, PiiKind /*piiKind*/ = PiiKind_Identity) override { } - virtual void SetTicket(TicketType, const std::string &) override {}; + virtual void SetTicket(TicketType, const std::string &) override {} - virtual void SetCommonField(const std::string &, const EventProperty &) override {}; + virtual void SetCommonField(const std::string &, const EventProperty &) override {} - virtual void SetCustomField(const std::string &, const EventProperty &) override {}; + virtual void SetCustomField(const std::string &, const EventProperty &) override {} }; class NullEventFilterCollection : public IEventFilterCollection @@ -34,8 +34,8 @@ namespace MAT_NS_BEGIN virtual void UnregisterEventFilter(const char*) override { } virtual void UnregisterAllFilters() noexcept override { } virtual bool CanEventPropertiesBeSent(const EventProperties&) const noexcept override { return true; } - virtual size_t Size() const noexcept override { return 0; }; - virtual bool Empty() const noexcept override { return false; }; + virtual size_t Size() const noexcept override { return 0; } + virtual bool Empty() const noexcept override { return false; } }; class NullLogger : public ILogger @@ -50,75 +50,75 @@ namespace MAT_NS_BEGIN return &nullContext; } - virtual void SetContext(const std::string & /*name*/, const char /*value*/[], PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, const char /*value*/[], PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, const std::string & /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, const std::string & /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, double /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, double /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, int8_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, int8_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, int16_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, int16_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, int32_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, int32_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, int64_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, int64_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, uint8_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, uint8_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, uint16_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, uint16_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, uint32_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, uint32_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, uint64_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, uint64_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, bool /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, bool /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, time_ticks_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, time_ticks_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, GUID_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {}; + virtual void SetContext(const std::string & /*name*/, GUID_t /*value*/, PiiKind /*piiKind*/ = PiiKind_None) override {} - virtual void SetContext(const std::string & /*name*/, const EventProperty & /*prop*/) override {}; + virtual void SetContext(const std::string & /*name*/, const EventProperty & /*prop*/) override {} - virtual void LogAppLifecycle(AppLifecycleState /*state*/, EventProperties const & /*properties*/) override {}; + virtual void LogAppLifecycle(AppLifecycleState /*state*/, EventProperties const & /*properties*/) override {} - virtual void LogSession(SessionState /*state*/, const EventProperties & /*properties*/) override {}; + virtual void LogSession(SessionState /*state*/, const EventProperties & /*properties*/) override {} - virtual void LogEvent(std::string const & /*name*/) override {}; + virtual void LogEvent(std::string const & /*name*/) override {} - virtual void LogEvent(EventProperties const & /*properties*/) override {}; + virtual void LogEvent(EventProperties const & /*properties*/) override {} - virtual void LogFailure(std::string const & /*signature*/, std::string const & /*detail*/, EventProperties const & /*properties*/) override {}; + virtual void LogFailure(std::string const & /*signature*/, std::string const & /*detail*/, EventProperties const & /*properties*/) override {} - virtual void LogFailure(std::string const & /*signature*/, std::string const & /*detail*/, std::string const & /*category*/, std::string const & /*id*/, EventProperties const & /*properties*/) override {}; + virtual void LogFailure(std::string const & /*signature*/, std::string const & /*detail*/, std::string const & /*category*/, std::string const & /*id*/, EventProperties const & /*properties*/) override {} - virtual void LogPageView(std::string const & /*id*/, std::string const & /*pageName*/, EventProperties const & /*properties*/) override {}; + virtual void LogPageView(std::string const & /*id*/, std::string const & /*pageName*/, EventProperties const & /*properties*/) override {} - virtual void LogPageView(std::string const & /*id*/, std::string const & /*pageName*/, std::string const & /*category*/, std::string const & /*uri*/, std::string const & /*referrerUri*/, EventProperties const & /*properties*/) override {}; + virtual void LogPageView(std::string const & /*id*/, std::string const & /*pageName*/, std::string const & /*category*/, std::string const & /*uri*/, std::string const & /*referrerUri*/, EventProperties const & /*properties*/) override {} - virtual void LogPageAction(std::string const & /*pageViewId*/, ActionType /*actionType*/, EventProperties const & /*properties*/) override {}; + virtual void LogPageAction(std::string const & /*pageViewId*/, ActionType /*actionType*/, EventProperties const & /*properties*/) override {} - virtual void LogPageAction(PageActionData const & /*pageActionData*/, EventProperties const & /*properties*/) override {}; + virtual void LogPageAction(PageActionData const & /*pageActionData*/, EventProperties const & /*properties*/) override {} - virtual void LogSampledMetric(std::string const & /*name*/, double /*value*/, std::string const & /*units*/, EventProperties const & /*properties*/) override {}; + virtual void LogSampledMetric(std::string const & /*name*/, double /*value*/, std::string const & /*units*/, EventProperties const & /*properties*/) override {} - virtual void LogSampledMetric(std::string const & /*name*/, double /*value*/, std::string const & /*units*/, std::string const & /*instanceName*/, std::string const & /*objectClass*/, std::string const & /*objectId*/, EventProperties const & /*properties*/) override {}; + virtual void LogSampledMetric(std::string const & /*name*/, double /*value*/, std::string const & /*units*/, std::string const & /*instanceName*/, std::string const & /*objectClass*/, std::string const & /*objectId*/, EventProperties const & /*properties*/) override {} - virtual void LogAggregatedMetric(std::string const & /*name*/, long /*duration*/, long /*count*/, EventProperties const & /*properties*/) override {}; + virtual void LogAggregatedMetric(std::string const & /*name*/, long /*duration*/, long /*count*/, EventProperties const & /*properties*/) override {} - virtual void LogAggregatedMetric(AggregatedMetricData const & /*metricData*/, EventProperties const & /*properties*/) override {}; + virtual void LogAggregatedMetric(AggregatedMetricData const & /*metricData*/, EventProperties const & /*properties*/) override {} - virtual void LogTrace(TraceLevel /*level*/, std::string const & /*message*/, EventProperties const & /*properties*/) override {}; + virtual void LogTrace(TraceLevel /*level*/, std::string const & /*message*/, EventProperties const & /*properties*/) override {} - virtual void LogUserState(UserState /*state*/, long /*timeToLiveInMillis*/, EventProperties const & /*properties*/) override {}; + virtual void LogUserState(UserState /*state*/, long /*timeToLiveInMillis*/, EventProperties const & /*properties*/) override {} virtual IEventFilterCollection& GetEventFilters() noexcept override { return m_filters; } virtual IEventFilterCollection const& GetEventFilters() const noexcept override { return m_filters; } - virtual void SetParentContext(ISemanticContext * /*context*/) override {}; + virtual void SetParentContext(ISemanticContext * /*context*/) override {} - virtual void SetLevel(uint8_t /*level*/) override {}; + virtual void SetLevel(uint8_t /*level*/) override {} private: NullEventFilterCollection m_filters; @@ -127,13 +127,13 @@ namespace MAT_NS_BEGIN class NullDataViewerCollection : public IDataViewerCollection { public: - virtual void DispatchDataViewerEvent(const std::vector&) const noexcept override {}; + virtual void DispatchDataViewerEvent(const std::vector&) const noexcept override {} - virtual void RegisterViewer(const std::shared_ptr&) override {}; + virtual void RegisterViewer(const std::shared_ptr&) override {} - virtual void UnregisterViewer(const char*) override {}; + virtual void UnregisterViewer(const char*) override {} - virtual void UnregisterAllViewers() override {}; + virtual void UnregisterAllViewers() override {} virtual bool IsViewerEnabled(const char*) const override { @@ -150,14 +150,14 @@ namespace MAT_NS_BEGIN return false; } - virtual ~NullDataViewerCollection() {}; + virtual ~NullDataViewerCollection() {} }; class NullLogManager : public ILogManager { public: - NullLogManager() { }; + NullLogManager() { } // Inherited via ILogManager virtual bool DispatchEvent(DebugEvent /*evt*/) override @@ -165,9 +165,9 @@ namespace MAT_NS_BEGIN return false; } - virtual void Configure() override {}; + virtual void Configure() override {} - virtual void FlushAndTeardown() override {}; + virtual void FlushAndTeardown() override {} virtual status_t Flush() override { @@ -311,9 +311,9 @@ namespace MAT_NS_BEGIN return &nullLogger; } - virtual void AddEventListener(DebugEventType /*type*/, DebugEventListener & /*listener*/) override {}; + virtual void AddEventListener(DebugEventType /*type*/, DebugEventListener & /*listener*/) override {} - virtual void RemoveEventListener(DebugEventType /*type*/, DebugEventListener & /*listener*/) override {}; + virtual void RemoveEventListener(DebugEventType /*type*/, DebugEventListener & /*listener*/) override {} virtual bool AttachEventSource(DebugEventSource & /*other*/) override { @@ -331,7 +331,7 @@ namespace MAT_NS_BEGIN return nullptr; } - virtual void ResetLogSessionData() override {}; + virtual void ResetLogSessionData() override {} virtual ILogController* GetLogController() override { @@ -353,9 +353,9 @@ namespace MAT_NS_BEGIN return m_filters; } - virtual void SetLevelFilter(uint8_t /*defaultLevel*/, uint8_t /*levelMin*/, uint8_t /*levelMax*/) override {}; + virtual void SetLevelFilter(uint8_t /*defaultLevel*/, uint8_t /*levelMin*/, uint8_t /*levelMax*/) override {} - virtual void SetLevelFilter(uint8_t /*defaultLevel*/, const std::set& /*allowedLevels*/) override {}; + virtual void SetLevelFilter(uint8_t /*defaultLevel*/, const std::set& /*allowedLevels*/) override {} virtual const IDataViewerCollection& GetDataViewerCollection() const noexcept override { diff --git a/lib/include/public/PayloadDecoder.hpp b/lib/include/public/PayloadDecoder.hpp index db8c9be75..ce01d0338 100644 --- a/lib/include/public/PayloadDecoder.hpp +++ b/lib/include/public/PayloadDecoder.hpp @@ -20,7 +20,7 @@ namespace CsProtocol { struct Record; -}; +} namespace MAT_NS_BEGIN { @@ -47,7 +47,7 @@ namespace MAT_NS_BEGIN { /// bool DecodeRequest(const std::vector& in, std::string& out, bool compressed = true); - }; + } } MAT_NS_END diff --git a/lib/include/public/VariantType.hpp b/lib/include/public/VariantType.hpp index 654554d78..17bb31a5e 100644 --- a/lib/include/public/VariantType.hpp +++ b/lib/include/public/VariantType.hpp @@ -13,9 +13,9 @@ // Constructor and getter for Variant type #define VARIANT_PROP(basetype, field, typeenum) \ - Variant(basetype v) : field(v), type(typeenum) {} ; \ - operator basetype() { return (basetype)field; }; \ - Variant& operator=(basetype v) { field = v; type = typeenum; return *this; }; + Variant(basetype v) : field(v), type(typeenum) {} \ + operator basetype() { return (basetype)field; } \ + Variant& operator=(basetype v) { field = v; type = typeenum; return *this; } // Avoid conflict with Mac platforms where #defines TYPE_BOOL. // @@ -52,7 +52,7 @@ class Variant public: // Thread-safe variants - VARIANT_LOCK(lock_object); + VARIANT_LOCK(lock_object) enum Type { @@ -75,7 +75,7 @@ class Variant return nullVariant; } - Variant() : iV(0), type(TYPE_NULL) {}; + Variant() : iV(0), type(TYPE_NULL) {} Variant(const Variant& other) noexcept { @@ -88,22 +88,22 @@ class Variant } // All integer types - VARIANT_PROP(int8_t, iV, TYPE_INT); - VARIANT_PROP(int16_t, iV, TYPE_INT); - VARIANT_PROP(int32_t, iV, TYPE_INT); - VARIANT_PROP(int64_t, iV, TYPE_INT); - VARIANT_PROP(uint8_t, iV, TYPE_INT); - VARIANT_PROP(uint16_t, iV, TYPE_INT); - VARIANT_PROP(uint32_t, iV, TYPE_INT); - VARIANT_PROP(uint64_t, iV, TYPE_INT); + VARIANT_PROP(int8_t, iV, TYPE_INT) + VARIANT_PROP(int16_t, iV, TYPE_INT) + VARIANT_PROP(int32_t, iV, TYPE_INT) + VARIANT_PROP(int64_t, iV, TYPE_INT) + VARIANT_PROP(uint8_t, iV, TYPE_INT) + VARIANT_PROP(uint16_t, iV, TYPE_INT) + VARIANT_PROP(uint32_t, iV, TYPE_INT) + VARIANT_PROP(uint64_t, iV, TYPE_INT) // All floating point types - VARIANT_PROP(float, dV, TYPE_DOUBLE); - VARIANT_PROP(double, dV, TYPE_DOUBLE); + VARIANT_PROP(float, dV, TYPE_DOUBLE) + VARIANT_PROP(double, dV, TYPE_DOUBLE) - VARIANT_PROP(void*, pV, TYPE_PTR); + VARIANT_PROP(void*, pV, TYPE_PTR) - Variant(const char* v) : sV(v), type(TYPE_STRING) {}; + Variant(const char* v) : sV(v), type(TYPE_STRING) {} operator const char*() { @@ -114,7 +114,7 @@ class Variant if (type == TYPE_NULL) return ""; return nullptr; - }; + } Variant& operator=(std::string value) { @@ -242,7 +242,7 @@ class Variant } // Boolean - VARIANT_PROP(bool, bV, TYPE_BOOL); + VARIANT_PROP(bool, bV, TYPE_BOOL) // Object (or map) Variant(VariantMap& m) : @@ -252,7 +252,7 @@ class Variant { mV[kv.first] = kv.second; } - }; + } Variant(VariantMap && m) : type(TYPE_OBJ) @@ -273,11 +273,11 @@ class Variant // Array (or vector) Variant(VariantArray& a) : aV(a), - type(TYPE_ARR) {}; + type(TYPE_ARR) {} Variant(VariantArray && a) : aV(std::move(a)), - type(TYPE_ARR) {}; + type(TYPE_ARR) {} // Destroy all elements virtual ~Variant() { @@ -320,13 +320,13 @@ class Variant { VARIANT_LOCKGUARD(lock_object); return mV; - }; + } operator VariantMap&() const { VARIANT_LOCKGUARD(lock_object); return mV; - }; + } /** @@ -336,7 +336,7 @@ class Variant { VARIANT_LOCKGUARD(lock_object); return aV; - }; + } /** * @@ -361,7 +361,7 @@ class Variant // Otherwise it's an invalid op - return const NULL return ConstNull(); - }; + } /** * @@ -376,7 +376,7 @@ class Variant // Accessing index of something that is not an array returns a null const variant. // We may consider adding an assert here for debug builds. return ConstNull(); // return const NULL Variant - }; + } /** * diff --git a/lib/include/public/mat.h b/lib/include/public/mat.h index 7182be9af..1d0547c85 100644 --- a/lib/include/public/mat.h +++ b/lib/include/public/mat.h @@ -293,7 +293,7 @@ extern "C" { { pv.as_double = val; return pv; - }; + } #define _DBL(key, val) { key, TYPE_DOUBLE, _DBL2({ NULL }, val) } #define PII_DBL(key, val, kind) { key, TYPE_DOUBLE, _DBL2({ NULL }, val), kind } diff --git a/lib/offline/MemoryStorage.cpp b/lib/offline/MemoryStorage.cpp index 69c320f20..f9ec6f026 100644 --- a/lib/offline/MemoryStorage.cpp +++ b/lib/offline/MemoryStorage.cpp @@ -9,7 +9,7 @@ namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_CLASS(MemoryStorage, "EventsSDK.MemoryStorage", "Events telemetry client - MemoryStorage class"); + MATSDK_LOG_INST_COMPONENT_CLASS(MemoryStorage, "EventsSDK.MemoryStorage", "Events telemetry client - MemoryStorage class") MemoryStorage::MemoryStorage(ILogManager & logManager, IRuntimeConfig & runtimeConfig) : m_observer(nullptr), diff --git a/lib/offline/OfflineStorageHandler.cpp b/lib/offline/OfflineStorageHandler.cpp index da56a0588..ba66a6658 100644 --- a/lib/offline/OfflineStorageHandler.cpp +++ b/lib/offline/OfflineStorageHandler.cpp @@ -16,7 +16,7 @@ namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_CLASS(OfflineStorageHandler, "EventsSDK.StorageHandler", "Events telemetry client - OfflineStorageHandler class"); + MATSDK_LOG_INST_COMPONENT_CLASS(OfflineStorageHandler, "EventsSDK.StorageHandler", "Events telemetry client - OfflineStorageHandler class") OfflineStorageHandler::OfflineStorageHandler(ILogManager& logManager, IRuntimeConfig& runtimeConfig, ITaskDispatcher& taskDispatcher) : m_observer(nullptr), diff --git a/lib/offline/OfflineStorage_SQLite.cpp b/lib/offline/OfflineStorage_SQLite.cpp index cf4e61d50..e3a12e30a 100644 --- a/lib/offline/OfflineStorage_SQLite.cpp +++ b/lib/offline/OfflineStorage_SQLite.cpp @@ -43,7 +43,7 @@ namespace MAT_NS_BEGIN { { locked = m_db->trylock(); } - }; + } ~DbTransaction() { @@ -54,7 +54,7 @@ namespace MAT_NS_BEGIN { } }; - MATSDK_LOG_INST_COMPONENT_CLASS(OfflineStorage_SQLite, "EventsSDK.Storage", "Events telemetry client - OfflineStorage_SQLite class"); + MATSDK_LOG_INST_COMPONENT_CLASS(OfflineStorage_SQLite, "EventsSDK.Storage", "Events telemetry client - OfflineStorage_SQLite class") static int const CURRENT_SCHEMA_VERSION = 1; #define TABLE_NAME_EVENTS "events" diff --git a/lib/offline/OfflineStorage_SQLite.hpp b/lib/offline/OfflineStorage_SQLite.hpp index 61f6906af..f155686ee 100644 --- a/lib/offline/OfflineStorage_SQLite.hpp +++ b/lib/offline/OfflineStorage_SQLite.hpp @@ -31,7 +31,7 @@ namespace MAT_NS_BEGIN { virtual ~OfflineStorage_SQLite() override; virtual void Initialize(IOfflineStorageObserver& observer) override; virtual void Shutdown() override; - virtual void Flush() override {}; + virtual void Flush() override {} virtual void Execute(std::string command); virtual bool StoreRecord(StorageRecord const& record) override; virtual size_t StoreRecords(std::vector & records) override; diff --git a/lib/offline/SQLiteWrapper.hpp b/lib/offline/SQLiteWrapper.hpp index 00e58edb1..dfeca94e5 100644 --- a/lib/offline/SQLiteWrapper.hpp +++ b/lib/offline/SQLiteWrapper.hpp @@ -504,7 +504,7 @@ namespace MAT_NS_BEGIN { MATSDK_LOG_DECL_COMPONENT_CLASS(); }; - MATSDK_LOG_INST_COMPONENT_CLASS(SqliteDB, "EventsSDK.SQLiteDB", "Events telemetry client - SqliteDB class"); + MATSDK_LOG_INST_COMPONENT_CLASS(SqliteDB, "EventsSDK.SQLiteDB", "Events telemetry client - SqliteDB class") //--- @@ -789,13 +789,13 @@ namespace MAT_NS_BEGIN { bool m_error; public: - sqlite3_stmt * handle() { return m_stmt; }; + sqlite3_stmt * handle() { return m_stmt; } private: MATSDK_LOG_DECL_COMPONENT_CLASS(); }; - MATSDK_LOG_INST_COMPONENT_CLASS(SqliteStatement, "EventsSDK.SQLiteStatement", "Events telemetry client - Sqlite statement class"); + MATSDK_LOG_INST_COMPONENT_CLASS(SqliteStatement, "EventsSDK.SQLiteStatement", "Events telemetry client - Sqlite statement class") } MAT_NS_END diff --git a/lib/pal/NetworkInformationImpl.hpp b/lib/pal/NetworkInformationImpl.hpp index 0f498e3d6..e780f71ae 100644 --- a/lib/pal/NetworkInformationImpl.hpp +++ b/lib/pal/NetworkInformationImpl.hpp @@ -28,7 +28,7 @@ namespace PAL_NS_BEGIN { virtual void UnRegisterInformationChangedCallback(int callbackToken) { --m_registeredCount; m_info_helper.UnRegisterInformationChangedCallback(callbackToken); } // INetworkInformation API - virtual std::string const& GetNetworkProvider() { return m_provider; }; + virtual std::string const& GetNetworkProvider() { return m_provider; } virtual NetworkType GetNetworkType() { return m_type; } virtual NetworkCost GetNetworkCost() { return m_cost; } diff --git a/lib/pal/SystemInformationImpl.hpp b/lib/pal/SystemInformationImpl.hpp index e0afbc255..b9f2b92f8 100644 --- a/lib/pal/SystemInformationImpl.hpp +++ b/lib/pal/SystemInformationImpl.hpp @@ -27,20 +27,20 @@ namespace PAL_NS_BEGIN { virtual void UnRegisterInformationChangedCallback(int callbackToken) override; // ISystemInformation API - virtual std::string const& GetAppId() const override { return m_app_id; }; + virtual std::string const& GetAppId() const override { return m_app_id; } virtual std::string const& GetAppVersion() const override { return m_app_version; } virtual std::string const& GetAppLanguage() const override { return m_app_language; } - virtual std::string const& GetOsFullVersion() const override { return m_os_full_version; }; - virtual std::string const& GetOsMajorVersion() const override { return m_os_major_version; }; - virtual std::string const& GetOsName() const override { return m_os_name; }; + virtual std::string const& GetOsFullVersion() const override { return m_os_full_version; } + virtual std::string const& GetOsMajorVersion() const override { return m_os_major_version; } + virtual std::string const& GetOsName() const override { return m_os_name; } - virtual std::string const& GetUserLanguage() const override { return m_user_language; }; - virtual std::string const& GetUserTimeZone() const override { return m_user_timezone; }; - virtual std::string const& GetUserAdvertisingId() const override { return m_user_advertising_id; }; + virtual std::string const& GetUserLanguage() const override { return m_user_language; } + virtual std::string const& GetUserTimeZone() const override { return m_user_timezone; } + virtual std::string const& GetUserAdvertisingId() const override { return m_user_advertising_id; } - virtual std::string const& GetDeviceClass() const override { return m_device_class; }; - virtual std::string const& GetCommercialId() const override { return m_commercial_id; }; + virtual std::string const& GetDeviceClass() const override { return m_device_class; } + virtual std::string const& GetCommercialId() const override { return m_commercial_id; } SystemInformationImpl(MAT::IRuntimeConfig& configuration); ~SystemInformationImpl() override; diff --git a/lib/pal/TaskDispatcher.hpp b/lib/pal/TaskDispatcher.hpp index 033851ffc..4b977708b 100644 --- a/lib/pal/TaskDispatcher.hpp +++ b/lib/pal/TaskDispatcher.hpp @@ -69,12 +69,12 @@ namespace PAL_NS_BEGIN { DeferredCallbackHandle(MAT::Task* task, MAT::ITaskDispatcher* taskDispatcher) : m_task(task), - m_taskDispatcher(taskDispatcher) { }; - DeferredCallbackHandle() {}; + m_taskDispatcher(taskDispatcher) { } + DeferredCallbackHandle() {} DeferredCallbackHandle(DeferredCallbackHandle&& h) { *this = std::move(h); - }; + } DeferredCallbackHandle& operator=(DeferredCallbackHandle&& other) { diff --git a/lib/pal/desktop/WindowsEnvironmentInfo.hpp b/lib/pal/desktop/WindowsEnvironmentInfo.hpp index 0dc445d9e..c2cd99446 100644 --- a/lib/pal/desktop/WindowsEnvironmentInfo.hpp +++ b/lib/pal/desktop/WindowsEnvironmentInfo.hpp @@ -34,7 +34,7 @@ namespace MAT_NS_BEGIN { default: return OsArchitectureType_Unknown; } - }; + } static std::string GetTimeZone() { @@ -49,7 +49,7 @@ namespace MAT_NS_BEGIN { // Need to handle the case when API return TIME_ZONE_ID_UNKNOWN. Otherwise we may be reporting invalid timeZone.Bias return TimeZoneBiasToISO8601(timeZone.Bias + timeZone.StandardBias); } - }; + } protected: // Convert a bias in minutes to the ISO 8601 time zone representations. // ISO 8601 examples: +01:30, -08 diff --git a/lib/stats/MetaStats.cpp b/lib/stats/MetaStats.cpp index 8be58bd44..fd4ea28cf 100644 --- a/lib/stats/MetaStats.cpp +++ b/lib/stats/MetaStats.cpp @@ -627,7 +627,7 @@ namespace MAT_NS_BEGIN { m_telemetryStats.offlineStorageStats.lastFailureReason = reason; } - MATSDK_LOG_INST_COMPONENT_CLASS(RecordStats, "EventsSDK.RecordStats", "RecordStats"); + MATSDK_LOG_INST_COMPONENT_CLASS(RecordStats, "EventsSDK.RecordStats", "RecordStats") } MAT_NS_END diff --git a/lib/system/EventProperties.cpp b/lib/system/EventProperties.cpp index fe1d72029..c534db824 100644 --- a/lib/system/EventProperties.cpp +++ b/lib/system/EventProperties.cpp @@ -126,7 +126,7 @@ namespace MAT_NS_BEGIN { } return (*this); - }; + } /// /// Set the Epoch unix timestamp in milliseconds of the event. diff --git a/lib/system/EventProperty.cpp b/lib/system/EventProperty.cpp index bf892d3f3..e60eaf9be 100644 --- a/lib/system/EventProperty.cpp +++ b/lib/system/EventProperty.cpp @@ -30,12 +30,12 @@ namespace MAT_NS_BEGIN { /// /// Default constructor for an empty object /// - time_ticks_t::time_ticks_t() : ticks(0) {}; + time_ticks_t::time_ticks_t() : ticks(0) {} /// /// Convert number of .NET ticks to time_ticks_t structure /// - time_ticks_t::time_ticks_t(uint64_t raw) : ticks(raw) {}; + time_ticks_t::time_ticks_t(uint64_t raw) : ticks(raw) {} /// /// time_t time must contain timestamp in UTC time @@ -82,7 +82,7 @@ namespace MAT_NS_BEGIN { { Data4[i] = 0; } - }; + } /// /// GUID_t constructor that accepts string @@ -735,7 +735,7 @@ namespace MAT_NS_BEGIN { as_guid = {}; as_string = new char[1]; as_string[0] = 0; - }; + } /// /// EventProperty constructor for string value @@ -759,7 +759,7 @@ namespace MAT_NS_BEGIN { memcpy((void*)as_string, (void*)value, len); as_string[len] = 0; } - }; + } /// /// EventProperty constructor for string value @@ -776,54 +776,54 @@ namespace MAT_NS_BEGIN { memcpy((void*)as_string, (void*)value.c_str(), len); as_string[len] = 0; - }; + } /// /// EventProperty constructor for int64 value /// /// int64_t value /// Pii kind - EventProperty::EventProperty(int64_t value, PiiKind piiKind, DataCategory category) : type(TYPE_INT64), piiKind(piiKind), dataCategory(category), as_int64(value) {}; + EventProperty::EventProperty(int64_t value, PiiKind piiKind, DataCategory category) : type(TYPE_INT64), piiKind(piiKind), dataCategory(category), as_int64(value) {} /// /// EventProperty constructor for double value /// /// double value /// Pii kind - EventProperty::EventProperty(double value, PiiKind piiKind, DataCategory category) : type(TYPE_DOUBLE), piiKind(piiKind), dataCategory(category), as_double(value) {}; + EventProperty::EventProperty(double value, PiiKind piiKind, DataCategory category) : type(TYPE_DOUBLE), piiKind(piiKind), dataCategory(category), as_double(value) {} /// /// EventProperty constructor for time in .NET ticks /// /// time_ticks_t value - time in .NET ticks /// Pii kind - EventProperty::EventProperty(time_ticks_t value, PiiKind piiKind, DataCategory category) : type(TYPE_TIME), piiKind(piiKind), dataCategory(category), as_time_ticks(value) {}; + EventProperty::EventProperty(time_ticks_t value, PiiKind piiKind, DataCategory category) : type(TYPE_TIME), piiKind(piiKind), dataCategory(category), as_time_ticks(value) {} /// /// EventProperty constructor for boolean value /// /// boolean value /// Pii kind - EventProperty::EventProperty(bool value, PiiKind piiKind, DataCategory category) : type(TYPE_BOOLEAN), piiKind(piiKind), dataCategory(category), as_bool(value) {}; + EventProperty::EventProperty(bool value, PiiKind piiKind, DataCategory category) : type(TYPE_BOOLEAN), piiKind(piiKind), dataCategory(category), as_bool(value) {} /// /// EventProperty constructor for GUID /// /// GUID_t value /// Pii kind - EventProperty::EventProperty(GUID_t value, PiiKind piiKind, DataCategory category) : type(TYPE_GUID), piiKind(piiKind), dataCategory(category), as_guid(value) {}; + EventProperty::EventProperty(GUID_t value, PiiKind piiKind, DataCategory category) : type(TYPE_GUID), piiKind(piiKind), dataCategory(category), as_guid(value) {} // All other integer types get converted to int64_t #ifndef LONG_IS_INT64_T - EventProperty::EventProperty(long value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; + EventProperty::EventProperty(long value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} #endif - EventProperty::EventProperty(int8_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(int16_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(int32_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(uint8_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(uint16_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(uint32_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; - EventProperty::EventProperty(uint64_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {}; + EventProperty::EventProperty(int8_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(int16_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(int32_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(uint8_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(uint16_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(uint32_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} + EventProperty::EventProperty(uint64_t value, PiiKind piiKind, DataCategory category) : EventProperty((int64_t)value, piiKind, category) {} /// Returns true whether the type is string AND the value is empty (i.e. whether its length is 0). bool EventProperty::empty() diff --git a/lib/system/ITelemetrySystem.hpp b/lib/system/ITelemetrySystem.hpp index 1453b6aae..3c8f894f6 100644 --- a/lib/system/ITelemetrySystem.hpp +++ b/lib/system/ITelemetrySystem.hpp @@ -24,7 +24,7 @@ namespace MAT_NS_BEGIN { class ITelemetrySystem : public DebugEventDispatcher { public: - virtual ~ITelemetrySystem() {}; + virtual ~ITelemetrySystem() {} // Transmission control virtual void start() = 0; diff --git a/lib/system/TelemetrySystem.hpp b/lib/system/TelemetrySystem.hpp index ae2787d14..d042b6198 100644 --- a/lib/system/TelemetrySystem.hpp +++ b/lib/system/TelemetrySystem.hpp @@ -34,7 +34,7 @@ namespace MAT_NS_BEGIN { class NullCompression { public: - NullCompression(IRuntimeConfig & ) {}; + NullCompression(IRuntimeConfig & ) {} }; class TelemetrySystem : public TelemetrySystemBase diff --git a/lib/system/TelemetrySystemBase.hpp b/lib/system/TelemetrySystemBase.hpp index bce1a0fd2..bc86a7fd0 100644 --- a/lib/system/TelemetrySystemBase.hpp +++ b/lib/system/TelemetrySystemBase.hpp @@ -41,7 +41,7 @@ namespace MAT_NS_BEGIN { onPause = []() { return true; }; onResume = []() { return true; }; onCleanup = []() { return true; }; - }; + } /// /// Starts this instance. @@ -53,7 +53,7 @@ namespace MAT_NS_BEGIN { onStart(); m_isPaused = false; } - }; + } /// /// Stops this instance. @@ -65,7 +65,7 @@ namespace MAT_NS_BEGIN { onStop(); } - }; + } /// /// Uploads pending events. @@ -73,7 +73,7 @@ namespace MAT_NS_BEGIN { virtual bool upload() override { return false; - }; + } /// /// Pauses event upload. @@ -87,7 +87,7 @@ namespace MAT_NS_BEGIN { onPause(); } } - }; + } /// /// Resumes event upload. @@ -101,7 +101,7 @@ namespace MAT_NS_BEGIN { onResume(); } } - }; + } /// /// Cleanups pending events upload @@ -112,27 +112,27 @@ namespace MAT_NS_BEGIN { { onCleanup(); } - }; + } // TODO: [MG] - consider for removal virtual void handleFlushTaskDispatcher() override { - }; + } virtual void signalDone() override { m_done.post(); - }; + } virtual void handleIncomingEventPrepared(IncomingEventContextPtr const&) override { - }; + } virtual void preparedIncomingEventAsync(IncomingEventContextPtr const& event) override { preparedIncomingEvent(event); - }; + } void sendEvent(IncomingEventContextPtr const& event) override { diff --git a/lib/tpm/TransmissionPolicyManager.cpp b/lib/tpm/TransmissionPolicyManager.cpp index 32ab38312..8d012a111 100644 --- a/lib/tpm/TransmissionPolicyManager.cpp +++ b/lib/tpm/TransmissionPolicyManager.cpp @@ -41,7 +41,7 @@ namespace MAT_NS_BEGIN { return (a > b) ? (a - b) : (b - a); } - MATSDK_LOG_INST_COMPONENT_CLASS(TransmissionPolicyManager, "EventsSDK.TPM", "Events telemetry client - TransmissionPolicyManager class"); + MATSDK_LOG_INST_COMPONENT_CLASS(TransmissionPolicyManager, "EventsSDK.TPM", "Events telemetry client - TransmissionPolicyManager class") TransmissionPolicyManager::TransmissionPolicyManager(ITelemetrySystem& system, ITaskDispatcher& taskDispatcher, IBandwidthController* bandwidthController) : m_system(system), diff --git a/lib/tpm/TransmitProfiles.cpp b/lib/tpm/TransmitProfiles.cpp index c5a6fed4b..cc34be6a1 100644 --- a/lib/tpm/TransmitProfiles.cpp +++ b/lib/tpm/TransmitProfiles.cpp @@ -92,7 +92,7 @@ static void initTransmitProfileFields() transmitProfilePowerState()["unknown"] = (PowerSource_Unknown); transmitProfilePowerState()["battery"] = (PowerSource_Battery); transmitProfilePowerState()["charging"] = (PowerSource_Charging); -}; +} #endif #define LOCK_PROFILES std::lock_guard lock(profiles_mtx()) @@ -142,7 +142,7 @@ namespace MAT_NS_BEGIN { std::string& TransmitProfiles::getProfile() { LOCK_PROFILES; return currProfileName(); - }; + } /// /// Get current device network and power state @@ -152,7 +152,7 @@ namespace MAT_NS_BEGIN { LOCK_PROFILES; netCost = currNetCost; powState = currPowState; - }; + } /// /// Print transmit profiles to debug log diff --git a/lib/utils/Utils.cpp b/lib/utils/Utils.cpp index ae6de1947..1a4ce4e2f 100644 --- a/lib/utils/Utils.cpp +++ b/lib/utils/Utils.cpp @@ -35,7 +35,7 @@ #include namespace MAT_NS_BEGIN { - MATSDK_LOG_INST_COMPONENT_NS("MATSDK", "MS App Telemetry client"); + MATSDK_LOG_INST_COMPONENT_NS("MATSDK", "MS App Telemetry client") } MAT_NS_END namespace MAT_NS_BEGIN {