File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ namespace libscratchcpp
1313/* !
1414 * \typedef BlockImpl
1515 *
16- * BlockImpl is used to store block implementation functions as std::function in blocks .
16+ * BlockImpl is a function pointer for block implementation functions.
1717 */
18- using BlockImpl = std::function< Value( const BlockArgs &)> ;
18+ using BlockImpl = Value (*)( const BlockArgs &);
1919
2020/* ! Generates a random number in the given interval like the random.randint() function in Python. */
2121template <typename T>
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ class IBlockSection
8080 template <class F >
8181 void addBlock (const std::string &opcode, F &&f)
8282 {
83- m_blocks[opcode] = std::bind (f, std::placeholders::_1) ;
83+ m_blocks[opcode] = f ;
8484 }
8585
8686 /* ! Assigns an input ID to an input name. */
You can’t perform that action at this time.
0 commit comments