Skip to content

Commit

Permalink
C++17 switch
Browse files Browse the repository at this point in the history
  • Loading branch information
phnzb committed Jun 19, 2024
1 parent 3fb3bbd commit dff5df1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set_property(GLOBAL PROPERTY INCLUDES)
set(VERSION "24.2")
set(PACKAGE "nzbget")
set(PACKAGE_BUGREPORT "https://github.com/nzbgetcom/nzbget/issues")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
8 changes: 4 additions & 4 deletions daemon/extension/ExtensionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace ExtensionManager
{
const Extensions& Manager::GetExtensions() const &
{
std::shared_lock<std::shared_timed_mutex> lock{m_mutex};
std::shared_lock<std::shared_mutex> lock{m_mutex};
return m_extensions;
}

Expand All @@ -58,7 +58,7 @@ namespace ExtensionManager
boost::optional<std::string>
Manager::UpdateExtension(const std::string& filename, const std::string& extName)
{
std::unique_lock<std::shared_timed_mutex> lock{m_mutex};
std::unique_lock<std::shared_mutex> lock{m_mutex};

auto extensionIt = GetByName(extName);
if (extensionIt == std::end(m_extensions))
Expand Down Expand Up @@ -135,7 +135,7 @@ namespace ExtensionManager
boost::optional<std::string>
Manager::DeleteExtension(const std::string& name)
{
std::unique_lock<std::shared_timed_mutex> lock{m_mutex};
std::unique_lock<std::shared_mutex> lock{m_mutex};

auto extensionIt = GetByName(name);
if (extensionIt == std::end(m_extensions))
Expand Down Expand Up @@ -167,7 +167,7 @@ namespace ExtensionManager
return std::string("\"ScriptDir\" is not specified");
}

std::unique_lock<std::shared_timed_mutex> lock{m_mutex};
std::unique_lock<std::shared_mutex> lock{m_mutex};

m_extensions.clear();

Expand Down
2 changes: 1 addition & 1 deletion daemon/extension/ExtensionManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace ExtensionManager
DeleteExtension(const Extension::Script& ext);

Extensions m_extensions;
mutable std::shared_timed_mutex m_mutex;
mutable std::shared_mutex m_mutex;
};
}

Expand Down

0 comments on commit dff5df1

Please sign in to comment.