From 309a2f9fbd82f5acdcd969dac089b06aa5ad86a6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 1 May 2017 15:34:26 +0300 Subject: service: code style --- um/service/src/device.cpp | 17 ----------------- um/service/src/handle.cpp | 27 --------------------------- um/service/src/service.cpp | 18 ------------------ um/service/src/service_handle.cpp | 27 --------------------------- um/service/src/service_manager.cpp | 19 +------------------ 5 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 um/service/src/handle.cpp delete mode 100644 um/service/src/service_handle.cpp (limited to 'um/service/src') 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 #include #include -#include 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& 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 -// 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 - -namespace libservice -{ - void swap(Handle& a, Handle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap( - 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 #include -#include -#include 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& 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 -// 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 - -namespace libservice -{ - void swap(ServiceHandle& a, ServiceHandle& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } -} - -namespace std -{ - template <> - void swap( - 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 #include -#include 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& a, - libservice::ServiceManager& b) LIBSERVICE_NOEXCEPT - { - a.swap(b); - } } -- cgit v1.2.3