diff options
Diffstat (limited to '')
-rw-r--r-- | um/service/src/device.cpp | 17 | ||||
-rw-r--r-- | um/service/src/handle.cpp | 27 | ||||
-rw-r--r-- | um/service/src/service.cpp | 18 | ||||
-rw-r--r-- | um/service/src/service_handle.cpp | 27 | ||||
-rw-r--r-- | um/service/src/service_manager.cpp | 19 |
5 files changed, 1 insertions, 107 deletions
diff --git a/um/service/src/device.cpp b/um/service/src/device.cpp index 1bdb42f..f1ecccb 100644 --- a/um/service/src/device.cpp +++ b/um/service/src/device.cpp @@ -13,7 +13,6 @@ #include <stdexcept> #include <string> #include <system_error> -#include <utility> namespace libservice { @@ -117,20 +116,4 @@ namespace libservice return nbwritten; } - - void swap(Device& a, Device& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap<libservice::Device>( - libservice::Device& a, - libservice::Device& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } } diff --git a/um/service/src/handle.cpp b/um/service/src/handle.cpp deleted file mode 100644 index 7567781..0000000 --- a/um/service/src/handle.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015 Egor Tensin <Egor.Tensin@gmail.com> -// This file is part of the "Windows 7 drivers" project. -// For details, see https://github.com/egor-tensin/windows7-drivers. -// Distributed under the MIT License. - -#include "libservice/all.hpp" - -#include <utility> - -namespace libservice -{ - void swap(Handle& a, Handle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap<libservice::Handle>( - libservice::Handle& a, - libservice::Handle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} diff --git a/um/service/src/service.cpp b/um/service/src/service.cpp index 8b5e043..1cdfe71 100644 --- a/um/service/src/service.cpp +++ b/um/service/src/service.cpp @@ -9,8 +9,6 @@ #include <string> #include <system_error> -#include <utility> -#include <vector> namespace libservice { @@ -257,20 +255,4 @@ namespace libservice stop(); uninstall_service(handle); } - - void swap(Service& a, Service& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap<libservice::Service>( - libservice::Service& a, - libservice::Service& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } } diff --git a/um/service/src/service_handle.cpp b/um/service/src/service_handle.cpp deleted file mode 100644 index adce7f0..0000000 --- a/um/service/src/service_handle.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015 Egor Tensin <Egor.Tensin@gmail.com> -// This file is part of the "Windows 7 drivers" project. -// For details, see https://github.com/egor-tensin/windows7-drivers. -// Distributed under the MIT License. - -#include "libservice/all.hpp" - -#include <utility> - -namespace libservice -{ - void swap(ServiceHandle& a, ServiceHandle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap<libservice::ServiceHandle>( - libservice::ServiceHandle& a, - libservice::ServiceHandle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} diff --git a/um/service/src/service_manager.cpp b/um/service/src/service_manager.cpp index 61662de..530976c 100644 --- a/um/service/src/service_manager.cpp +++ b/um/service/src/service_manager.cpp @@ -8,13 +8,12 @@ #include <Windows.h> #include <system_error> -#include <utility> namespace libservice { ServiceManager ServiceManager::open() { - SC_HANDLE raw = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + const auto raw = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (NULL == raw) { @@ -25,20 +24,4 @@ namespace libservice return ServiceHandle(raw); } - - void swap(ServiceManager& a, ServiceManager& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap<libservice::ServiceManager>( - libservice::ServiceManager& a, - libservice::ServiceManager& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } } |