From 1f2bb8229f2625e4217294337cac4d65e766bc9a Mon Sep 17 00:00:00 2001 From: Chris Davis Date: Tue, 25 Feb 2025 10:33:00 -0800 Subject: [PATCH] Remove extra semicolons (#1331) Co-authored-by: Chris Davis --- lib/api/AuthTokensController.cpp | 2 +- lib/api/DataViewerCollection.cpp | 4 +- lib/api/DataViewerCollection.hpp | 2 +- lib/api/IRuntimeConfig.hpp | 2 +- lib/api/LogManagerImpl.cpp | 12 +-- lib/api/LogManagerImpl.hpp | 2 +- lib/api/Logger.cpp | 14 +-- lib/config/RuntimeConfig_Default.hpp | 8 +- lib/decorators/BaseDecorator.hpp | 2 +- lib/decorators/EventPropertiesDecorator.hpp | 2 +- lib/decorators/SemanticApiDecorators.hpp | 2 +- lib/http/HttpClientFactory.cpp | 2 +- lib/http/HttpClientManager.cpp | 2 +- lib/http/HttpClient_WinInet.cpp | 2 +- lib/include/mat/IDeviceInformation.hpp | 2 +- lib/include/mat/INetworkInformation.hpp | 2 +- lib/include/mat/ISystemInformation.hpp | 2 +- lib/include/public/CAPIClient.hpp | 2 +- lib/include/public/CommonFields.h | 2 +- lib/include/public/DebugEvents.hpp | 6 +- lib/include/public/IHttpClient.hpp | 4 +- lib/include/public/IModule.hpp | 4 +- lib/include/public/IOfflineStorage.hpp | 2 +- lib/include/public/ISemanticContext.hpp | 58 +++++------ lib/include/public/ITaskDispatcher.hpp | 2 +- lib/include/public/LogManagerProvider.hpp | 2 +- lib/include/public/NullObjects.hpp | 108 ++++++++++---------- lib/include/public/PayloadDecoder.hpp | 4 +- lib/include/public/VariantType.hpp | 54 +++++----- lib/include/public/mat.h | 2 +- lib/offline/MemoryStorage.cpp | 2 +- lib/offline/OfflineStorageHandler.cpp | 2 +- lib/offline/OfflineStorage_SQLite.cpp | 4 +- lib/offline/SQLiteWrapper.hpp | 6 +- lib/pal/NetworkInformationImpl.hpp | 2 +- lib/pal/SystemInformationImpl.hpp | 18 ++-- lib/pal/TaskDispatcher.hpp | 6 +- lib/pal/desktop/WindowsEnvironmentInfo.hpp | 4 +- lib/stats/MetaStats.cpp | 2 +- lib/system/EventProperties.cpp | 2 +- lib/system/EventProperty.cpp | 38 +++---- lib/system/ITelemetrySystem.hpp | 2 +- lib/system/TelemetrySystem.hpp | 2 +- lib/system/TelemetrySystemBase.hpp | 22 ++-- lib/tpm/TransmissionPolicyManager.cpp | 2 +- lib/tpm/TransmitProfiles.cpp | 2 +- lib/utils/Utils.cpp | 2 +- 47 files changed, 216 insertions(+), 216 deletions(-) diff --git a/lib/api/AuthTokensController.cpp b/lib/api/AuthTokensController.cpp index 7603a70b5..14ccc70f6 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 389055948..6992fee75 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 be4a03d25..6d014af72 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 aa6fcd8ba..c9d15295a 100644 --- a/lib/api/IRuntimeConfig.hpp +++ b/lib/api/IRuntimeConfig.hpp @@ -209,7 +209,7 @@ namespace MAT_NS_BEGIN /// virtual bool SkipIKeyRegistration() const = 0; - virtual ~IRuntimeConfig() {}; + virtual ~IRuntimeConfig() {} }; /// @endcond diff --git a/lib/api/LogManagerImpl.cpp b/lib/api/LogManagerImpl.cpp index 94e285aa1..fac8fdbd5 100644 --- a/lib/api/LogManagerImpl.cpp +++ b/lib/api/LogManagerImpl.cpp @@ -128,7 +128,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 @@ -374,7 +374,7 @@ namespace MAT_NS_BEGIN client->SetMsRootCheck(m_logConfiguration[CFG_MAP_HTTP][CFG_BOOL_HTTP_MS_ROOT_CHECK]); } #endif - }; + } LogManagerImpl::~LogManagerImpl() noexcept { @@ -541,7 +541,7 @@ namespace MAT_NS_BEGIN const std::string& LogManagerImpl::GetTransmitProfileName() { return TransmitProfiles::getProfile(); - }; + } ISemanticContext& LogManagerImpl::GetSemanticContext() { @@ -699,7 +699,7 @@ namespace MAT_NS_BEGIN void LogManagerImpl::AddEventListener(DebugEventType type, DebugEventListener& listener) { m_debugEventSource.AddEventListener(type, listener); - }; + } /// /// Removes the event listener. @@ -709,7 +709,7 @@ namespace MAT_NS_BEGIN void LogManagerImpl::RemoveEventListener(DebugEventType type, DebugEventListener& listener) { m_debugEventSource.RemoveEventListener(type, listener); - }; + } /// /// Dispatches the event. @@ -719,7 +719,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 f48b7a847..7dd7f7442 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 8540d0bcf..54d883664 100644 --- a/lib/api/Logger.cpp +++ b/lib/api/Logger.cpp @@ -175,37 +175,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 e919f67ca..27a8f6758 100644 --- a/lib/config/RuntimeConfig_Default.hpp +++ b/lib/config/RuntimeConfig_Default.hpp @@ -115,14 +115,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 { @@ -134,7 +134,7 @@ namespace MAT_NS_BEGIN return std::string(token); } return std::string(defaultToken); - }; + } virtual unsigned GetMetaStatsSendIntervalSec() override { @@ -144,7 +144,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 df341291e..60970fd12 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 103c11553..5bb3e927a 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 b8da4f68c..c2bdeddf2 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 7a8b1c33f..5419f161d 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 efda8d74a..58fa5fb4a 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 0589f9796..637b10778 100644 --- a/lib/http/HttpClient_WinInet.cpp +++ b/lib/http/HttpClient_WinInet.cpp @@ -540,7 +540,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 72e97b2c0..4f4eaa6ca 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 684aeae25..5e300af1c 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 4121dc01e..cd3585499 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 a632f2b02..14db93428 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 a75a57bba..dcd832215 100644 --- a/lib/include/public/CommonFields.h +++ b/lib/include/public/CommonFields.h @@ -120,6 +120,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 d4f9c83a0..506611c04 100644 --- a/lib/include/public/DebugEvents.hpp +++ b/lib/include/public/DebugEvents.hpp @@ -154,12 +154,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 0b1f56721..e9a71a210 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 047df4abb..b997585c2 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 ebd6ac35b..79f076fde 100644 --- a/lib/include/public/IOfflineStorage.hpp +++ b/lib/include/public/IOfflineStorage.hpp @@ -344,7 +344,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 b0adf421a..76d9f991b 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 3958bec1e..070f054bc 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 26d76d29a..1df343e0c 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 fcc640c05..f45739f57 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 9f8d1edb2..c6bb4a0dd 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 6785257ae..beda4053b 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 535e0ac3a..315627ca7 100644 --- a/lib/include/public/mat.h +++ b/lib/include/public/mat.h @@ -294,7 +294,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 8c7092217..09142f8b4 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 39b01b681..41b211d97 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 781a5dc2e..9b10ebfa2 100644 --- a/lib/offline/OfflineStorage_SQLite.cpp +++ b/lib/offline/OfflineStorage_SQLite.cpp @@ -31,7 +31,7 @@ namespace MAT_NS_BEGIN { { locked = m_db->trylock(); } - }; + } ~DbTransaction() { @@ -42,7 +42,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/SQLiteWrapper.hpp b/lib/offline/SQLiteWrapper.hpp index 0a475c3e1..3f4f998e3 100644 --- a/lib/offline/SQLiteWrapper.hpp +++ b/lib/offline/SQLiteWrapper.hpp @@ -518,7 +518,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") //--- @@ -803,13 +803,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 a19a41a3c..e56122531 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 dc386cd27..8d03d1383 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 0cf3e1090..ec6f2f690 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 543d66c73..8219b62b1 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 373660b03..e89d4ad86 100644 --- a/lib/stats/MetaStats.cpp +++ b/lib/stats/MetaStats.cpp @@ -622,7 +622,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 d801deda5..ebe62ff58 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 28bcc7e05..3bf9c3f3c 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 f17f12ae3..df78a1c2d 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 ddc41f300..df77cb971 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 e2c9189f2..30fd1d5af 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 efdb27ea9..83b82cf2a 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 038e84f9d..5daec5f8b 100644 --- a/lib/tpm/TransmitProfiles.cpp +++ b/lib/tpm/TransmitProfiles.cpp @@ -90,7 +90,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 eb70afdb3..d1639088a 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 {