aboutsummaryrefslogtreecommitdiff
path: root/src/common/fiber.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 18:20:06 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 18:20:06 -0400
commit2f8947583f2f0af4058600243d6c1d244e3c4890 (patch)
treea0e7a10c6131efb23d6fdb3ee7fc0de4bd4163af /src/common/fiber.cpp
parente486c66850637a05ba2912e3f1e25a97cfebc41e (diff)
Core/Common: Address Feedback.
Diffstat (limited to 'src/common/fiber.cpp')
-rw-r--r--src/common/fiber.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/common/fiber.cpp b/src/common/fiber.cpp
index f97ad433b4..1c1d09ccb8 100644
--- a/src/common/fiber.cpp
+++ b/src/common/fiber.cpp
@@ -54,9 +54,7 @@ Fiber::Fiber(std::function<void(void*)>&& entry_point_func, void* start_paramete
impl->handle = CreateFiber(default_stack_size, &FiberStartFunc, this);
}
-Fiber::Fiber() {
- impl = std::make_unique<FiberImpl>();
-}
+Fiber::Fiber() : impl{std::make_unique<FiberImpl>()} {}
Fiber::~Fiber() {
if (released) {
@@ -116,8 +114,8 @@ std::shared_ptr<Fiber> Fiber::ThreadToFiber() {
struct Fiber::FiberImpl {
alignas(64) std::array<u8, default_stack_size> stack;
- u8* stack_limit;
alignas(64) std::array<u8, default_stack_size> rewind_stack;
+ u8* stack_limit;
u8* rewind_stack_limit;
boost::context::detail::fcontext_t context;
boost::context::detail::fcontext_t rewind_context;
@@ -168,9 +166,7 @@ void Fiber::SetRewindPoint(std::function<void(void*)>&& rewind_func, void* start
rewind_parameter = start_parameter;
}
-Fiber::Fiber() {
- impl = std::make_unique<FiberImpl>();
-}
+Fiber::Fiber() : impl{std::make_unique<FiberImpl>()} {}
Fiber::~Fiber() {
if (released) {