Skip to content

Commit 9e8c3e4

Browse files
committed
Add finished property to CppExecutionContext
1 parent b9f31df commit 9e8c3e4

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎src/engine/internal/codegen/cpp/cppexecutioncontext.cpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ CppExecutionContext::CppExecutionContext(CppCompilerContext *ctx, Thread *thread
99
m_ctx(ctx)
1010
{
1111
}
12+
13+
bool CppExecutionContext::finished() const
14+
{
15+
return m_finished;
16+
}
17+
18+
void CppExecutionContext::setFinished(bool finished)
19+
{
20+
m_finished = finished;
21+
}

‎src/engine/internal/codegen/cpp/cppexecutioncontext.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ class LIBSCRATCHCPP_TEST_EXPORT CppExecutionContext : public ExecutionContext
1616
public:
1717
CppExecutionContext(CppCompilerContext *ctx, Thread *thread);
1818

19+
bool finished() const;
20+
void setFinished(bool finished);
21+
1922
private:
2023
CppCompilerContext *m_ctx = nullptr;
24+
bool m_finished = false;
2125
};
2226

2327
} // namespace libscratchcpp

0 commit comments

Comments
 (0)