Skip to content

Commit

Permalink
1.4.1
Browse files Browse the repository at this point in the history
* generator / async generator supports move
* applied some guide from the sonarcloud

Signed-off-by: luncliff <luncliff@gmail.com>
  • Loading branch information
luncliff committed Mar 23, 2019
1 parent 786b863 commit 8399236
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# ---------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.8)

project(coroutine LANGUAGES CXX VERSION 1.4.0)
project(coroutine LANGUAGES CXX VERSION 1.4.1)

# import cmake code snippets. see `cmake/`
list(APPEND CMAKE_MODULE_PATH
Expand Down
2 changes: 2 additions & 0 deletions interface/coroutine/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class reader final
std::swap(this->chan, rhs.chan);
return *this;
}
~reader() noexcept = default;

public:
bool await_ready() const noexcept(false);
Expand Down Expand Up @@ -184,6 +185,7 @@ class writer final
std::swap(this->chan, rhs.chan);
return *this;
}
~writer() noexcept = default;

public:
bool await_ready() const noexcept(false);
Expand Down
2 changes: 1 addition & 1 deletion interface/coroutine/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class suspend_queue final
suspend_queue& sq;

public:
redirect_to(suspend_queue& q) noexcept : sq{q}
explicit redirect_to(suspend_queue& q) noexcept : sq{q}
{
}
// override `suspend_always::await_suspend`
Expand Down
4 changes: 2 additions & 2 deletions modules/suspend/circular_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class bounded_circular_queue_t
return false;

const auto index = end;
end = next(end); // increase count;
end = next(end); // increase count

storage.at(index) = msg; // expect copy
return true;
Expand All @@ -56,7 +56,7 @@ class bounded_circular_queue_t
return false;

const auto index = begin;
begin = next(begin); // decrease count;
begin = next(begin); // decrease count

msg = std::move(storage.at(index)); // expect move
return true;
Expand Down

0 comments on commit 8399236

Please sign in to comment.