Unverified Commit a8bbc6d4 authored by Dennis Jenkins's avatar Dennis Jenkins Committed by GitHub

Merge pull request #414 from knowledge4igor/tiny_code_improvements_in_async

Tiny code improvements
parents 6e3bb2c3 25f9b474
......@@ -7,6 +7,8 @@
#pragma once
#include <pistache/typeid.h>
#include <type_traits>
#include <functional>
#include <memory>
......@@ -14,10 +16,9 @@
#include <vector>
#include <mutex>
#include <condition_variable>
#include <stdexcept>
#include <typeinfo>
#include <pistache/optional.h>
#include <pistache/typeid.h>
#include <pistache/common.h>
namespace Pistache {
namespace Async {
......@@ -396,8 +397,7 @@ namespace Async {
static_assert(sizeof...(Args) == 0,
"Can not attach a non-void continuation to a void-Promise");
void doResolve(const std::shared_ptr<CoreT<void>>& core) {
UNUSED(core)
void doResolve(const std::shared_ptr<CoreT<void>>& /*core*/) {
finishResolve(resolve_());
}
......@@ -474,8 +474,7 @@ namespace Async {
static_assert(sizeof...(Args) == 0,
"Can not attach a non-void continuation to a void-Promise");
void doResolve(const std::shared_ptr<CoreT<void>>& core) {
UNUSED(core)
void doResolve(const std::shared_ptr<CoreT<void>>& /*core*/) {
resolve_();
}
......@@ -582,8 +581,7 @@ namespace Async {
, reject_(reject)
{ }
void doResolve(const std::shared_ptr<CoreT<void>>& core) {
UNUSED(core)
void doResolve(const std::shared_ptr<CoreT<void>>& /*core*/) {
auto promise = resolve_();
finishResolve(promise);
}
......
......@@ -11,6 +11,8 @@
#pragma once
#include <functional>
namespace Pistache {
class TypeId {
......
#include "gtest/gtest.h"
#include <pistache/async.h>
#include <pistache/common.h>
#include <thread>
#include <algorithm>
#include <deque>
......@@ -7,8 +10,6 @@
#include <condition_variable>
#include <random>
#include <pistache/async.h>
using namespace Pistache;
Async::Promise<int> doAsync(int N)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment