diff --git a/src/account_factory.h b/src/account_factory.h index 576873aad35f6cdac535458991754180d971d615..c1aaa851ad0a38418610d6411e7bbb594687d12b 100644 --- a/src/account_factory.h +++ b/src/account_factory.h @@ -117,9 +117,9 @@ class AccountFactory { } private: - mutable std::recursive_mutex mutex_ = {}; - std::map<std::string, std::function<std::shared_ptr<Account>(const std::string&)> > generators_ = {}; - std::map<std::string, AccountMap<Account> > accountMaps_ = {}; + mutable std::recursive_mutex mutex_ {}; + std::map<std::string, std::function<std::shared_ptr<Account>(const std::string&)> > generators_ {}; + std::map<std::string, AccountMap<Account> > accountMaps_ {}; template <class T> const AccountMap<Account>* getMap_() const { diff --git a/src/iax/iaxvoiplink.cpp b/src/iax/iaxvoiplink.cpp index 1412aa86339664c85a3e4231c7c9c0e76223376f..b21ddb02dfe3fb8278c21a136bdff9b2c4f1e368 100644 --- a/src/iax/iaxvoiplink.cpp +++ b/src/iax/iaxvoiplink.cpp @@ -42,7 +42,7 @@ namespace ring { -std::mutex IAXVoIPLink::mutexIAX = {}; +std::mutex IAXVoIPLink::mutexIAX {}; IAXVoIPLink::IAXVoIPLink(IAXAccount& account) : account_(account), resampler_(new Resampler{44100}) {} diff --git a/src/iax/iaxvoiplink.h b/src/iax/iaxvoiplink.h index 778d127ccc37c93f563a7ea3a132506ce3704e82..908a3dc5f9e8aff85ab4d7f4ac1f119304d840d0 100644 --- a/src/iax/iaxvoiplink.h +++ b/src/iax/iaxvoiplink.h @@ -147,7 +147,7 @@ class IAXVoIPLink { /** encoder/decoder/resampler buffers */ AudioBuffer rawBuffer_{RAW_BUFFER_SIZE, AudioFormat::MONO()}; AudioBuffer resampledData_{RAW_BUFFER_SIZE * 4, AudioFormat::MONO()}; - unsigned char encodedData_[RAW_BUFFER_SIZE] = {}; + unsigned char encodedData_[RAW_BUFFER_SIZE] {}; std::unique_ptr<Resampler> resampler_; diff --git a/src/ip_utils.cpp b/src/ip_utils.cpp index 9043d6caf15b079687274a6656ad15a4290d5f60..76c089c37e1ceb21219d57b86b31ec2d84a99ca3 100644 --- a/src/ip_utils.cpp +++ b/src/ip_utils.cpp @@ -107,7 +107,7 @@ ip_utils::getLocalAddr(pj_uint16_t family) family = pj_AF_INET(); #endif } - IpAddr ip_addr = {}; + IpAddr ip_addr {}; pj_status_t status = pj_gethostip(family, ip_addr.pjPtr()); if (status == PJ_SUCCESS) { return ip_addr; @@ -128,7 +128,7 @@ ip_utils::getInterfaceAddr(const std::string &interface, pj_uint16_t family) if (interface == DEFAULT_INTERFACE) return getLocalAddr(family); - IpAddr addr = {}; + IpAddr addr {}; #ifndef _WIN32 const auto unix_family = family == pj_AF_INET() ? AF_INET : AF_INET6; diff --git a/src/media/audio/pulseaudio/pulselayer.cpp b/src/media/audio/pulseaudio/pulselayer.cpp index 1fb7822f5aae8237a5300f3ca727fa44aea56c67..bc305b8f6cdf74663ec82cb2d337c6ef5c385fa4 100644 --- a/src/media/audio/pulseaudio/pulselayer.cpp +++ b/src/media/audio/pulseaudio/pulselayer.cpp @@ -529,7 +529,7 @@ std::string stripEchoSufix(std::string deviceName) { #ifdef USE_PCRE_REGEX if (PA_EC_SUFFIX) { static const constexpr int resSize = 3; - int resPos[resSize] = {}; + int resPos[resSize] {}; int rc = pcre_exec(PA_EC_SUFFIX.get(), nullptr, deviceName.c_str(), deviceName.size(), 0, 0, resPos, resSize); if (rc > 0) { int start = resPos[0]; diff --git a/src/media/video/video_base.h b/src/media/video/video_base.h index d54ae11e49a07c64fc1bad7d72ad6f67099a600e..46d28704092e7370d2180889fbd5d039878d94bd 100644 --- a/src/media/video/video_base.h +++ b/src/media/video/video_base.h @@ -145,7 +145,7 @@ protected: private: std::shared_ptr<VideoFrame> writableFrame_ = nullptr; std::shared_ptr<VideoFrame> lastFrame_ = nullptr; - std::mutex mutex_ = {}; // lock writableFrame_/lastFrame_ access + std::mutex mutex_ {}; // lock writableFrame_/lastFrame_ access }; struct VideoSettings diff --git a/src/plugin_manager.h b/src/plugin_manager.h index 6218b0779d3d350a2a37b007a347d9528caefd53..e84d80b8e8c9e05fd2c697f067b6e976207a357a 100644 --- a/src/plugin_manager.h +++ b/src/plugin_manager.h @@ -131,21 +131,21 @@ class PluginManager int32_t invokeService(const std::string& name, void* data); - std::mutex mutex_ = {}; + std::mutex mutex_ {}; RING_PluginAPI pluginApi_ = { { RING_PLUGIN_ABI_VERSION, RING_PLUGIN_API_VERSION }, nullptr, // set by PluginManager constructor registerObjectFactory_, invokeService_, }; - PluginMap dynPluginMap_ = {}; // Only dynamic loaded plugins - ExitFuncVec exitFuncVec_ = {}; - ObjectFactoryMap exactMatchMap_ = {}; - ObjectFactoryVec wildCardVec_ = {}; + PluginMap dynPluginMap_ {}; // Only dynamic loaded plugins + ExitFuncVec exitFuncVec_ {}; + ObjectFactoryMap exactMatchMap_ {}; + ObjectFactoryVec wildCardVec_ {}; // Storage used during plugin initialisation. // Will be copied into previous ones only if the initialisation success. - ObjectFactoryMap tempExactMatchMap_ = {}; - ObjectFactoryVec tempWildCardVec_ = {}; + ObjectFactoryMap tempExactMatchMap_ {}; + ObjectFactoryVec tempWildCardVec_ {}; // registered services std::map<std::string, ServiceFunction> services_ {};