From 79e5776805f4abdc1c8f8b1e525e002c0f334e95 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Wed, 14 Oct 2015 15:56:50 +0200 Subject: [PATCH] qualify functions which use intrusive-list with const and noexcept --- include/boost/fiber/context.hpp | 40 ++++++++++++++++----------------- src/context.cpp | 26 ++++++++++----------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/include/boost/fiber/context.hpp b/include/boost/fiber/context.hpp index e5b3d65c..c3f22ecf 100644 --- a/include/boost/fiber/context.hpp +++ b/include/boost/fiber/context.hpp @@ -390,66 +390,66 @@ public: return properties_; } - bool ready_is_linked(); + bool ready_is_linked() const; - bool remote_ready_is_linked(); + bool remote_ready_is_linked() const; - bool sleep_is_linked(); + bool sleep_is_linked() const; - bool terminated_is_linked(); + bool terminated_is_linked() const; - bool wait_is_linked(); + bool wait_is_linked() const; - bool worker_is_linked(); + bool worker_is_linked() const; - bool yield_is_linked(); + bool yield_is_linked() const; template< typename List > - void ready_link( List & lst) { + void ready_link( List & lst) noexcept { lst.push_back( * this); } template< typename List > - void remote_ready_link( List & lst) { + void remote_ready_link( List & lst) noexcept { lst.push_back( * this); } template< typename Set > - void sleep_link( Set & set) { + void sleep_link( Set & set) noexcept { set.insert( * this); } template< typename List > - void terminated_link( List & lst) { + void terminated_link( List & lst) noexcept { lst.push_back( * this); } template< typename List > - void wait_link( List & lst) { + void wait_link( List & lst) noexcept { lst.push_back( * this); } template< typename List > - void worker_link( List & lst) { + void worker_link( List & lst) noexcept { lst.push_back( * this); } template< typename List > - void yield_link( List & lst) { + void yield_link( List & lst) noexcept { lst.push_back( * this); } - void ready_unlink(); + void ready_unlink() noexcept; - void remote_ready_unlink(); + void remote_ready_unlink() noexcept; - void sleep_unlink(); + void sleep_unlink() noexcept; - void wait_unlink(); + void wait_unlink() noexcept; - void worker_unlink(); + void worker_unlink() noexcept; - void yield_unlink(); + void yield_unlink() noexcept; void attach( context *); diff --git a/src/context.cpp b/src/context.cpp index d95e0bda..3ad3a781 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -390,67 +390,67 @@ context::set_properties( fiber_properties * props) { } bool -context::worker_is_linked() { +context::worker_is_linked() const { return worker_hook_.is_linked(); } bool -context::terminated_is_linked() { +context::terminated_is_linked() const { return terminated_hook_.is_linked(); } bool -context::ready_is_linked() { +context::ready_is_linked() const { return ready_hook_.is_linked(); } bool -context::remote_ready_is_linked() { +context::remote_ready_is_linked() const { return remote_ready_hook_.is_linked(); } bool -context::yield_is_linked() { +context::yield_is_linked() const { return yield_hook_.is_linked(); } bool -context::sleep_is_linked() { +context::sleep_is_linked() const { return sleep_hook_.is_linked(); } bool -context::wait_is_linked() { +context::wait_is_linked() const { return wait_hook_.is_linked(); } void -context::worker_unlink() { +context::worker_unlink() noexcept { worker_hook_.unlink(); } void -context::ready_unlink() { +context::ready_unlink() noexcept { ready_hook_.unlink(); } void -context::remote_ready_unlink() { +context::remote_ready_unlink() noexcept { remote_ready_hook_.unlink(); } void -context::yield_unlink() { +context::yield_unlink() noexcept { yield_hook_.unlink(); } void -context::sleep_unlink() { +context::sleep_unlink() noexcept { sleep_hook_.unlink(); } void -context::wait_unlink() { +context::wait_unlink() noexcept { wait_hook_.unlink(); }