aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/utils/libservice/src/service_manager.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-07-15 22:08:33 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-07-15 22:08:33 +0300
commit01c1146276f7319843c357480c4374fe555f07c5 (patch)
treeca04e44b03b126de4ad3071e3e70df3982f9f174 /utils/libservice/src/service_manager.cpp
parentREADME updates (diff)
downloadwindows7-drivers-01c1146276f7319843c357480c4374fe555f07c5.tar.gz
windows7-drivers-01c1146276f7319843c357480c4374fe555f07c5.zip
utils: code style
Diffstat (limited to 'utils/libservice/src/service_manager.cpp')
-rw-r--r--utils/libservice/src/service_manager.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/libservice/src/service_manager.cpp b/utils/libservice/src/service_manager.cpp
index b3c0b96..d815089 100644
--- a/utils/libservice/src/service_manager.cpp
+++ b/utils/libservice/src/service_manager.cpp
@@ -6,10 +6,7 @@
* See LICENSE.txt for details.
*/
-#include "libservice/common.hpp"
-#include "libservice/service_handle.hpp"
-#include "libservice/service_manager.hpp"
-#include "libservice/windows_error.hpp"
+#include "libservice/all.hpp"
#include <Windows.h>
@@ -25,10 +22,11 @@ namespace libservice
if (NULL == raw)
{
const auto ec = GetLastError();
- throw std::system_error(ec, WinErrorCategory::get());
+ throw std::system_error(
+ ec, WindowsErrorCategory::get(), LIBSERVICE_ERROR_PREFIX);
}
- return ServiceManager(ServiceHandle(raw));
+ return ServiceHandle(raw);
}
void swap(ServiceManager& a, ServiceManager& b) LIBSERVICE_NOEXCEPT