File tree 2 files changed +7
-16
lines changed
2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -29,21 +29,14 @@ APIReg::APIReg(const APIFunc *func)
29
29
: m_func(func),
30
30
m_impl(KEY(" API" )), m_vararg(KEY(" APIvararg" )), m_help(KEY(" APIdef" ))
31
31
{
32
- registerFunc ();
32
+ plugin_register (m_impl.c_str (), m_func->cImpl );
33
+ plugin_register (m_vararg.c_str (), m_func->reascriptImpl );
34
+ plugin_register (m_help.c_str (), m_func->definition );
33
35
}
34
36
35
37
APIReg::~APIReg ()
36
38
{
37
- m_impl.insert (m_impl.begin (), ' -' );
38
- m_vararg.insert (m_vararg.begin (), ' -' );
39
- m_help.insert (m_help.begin (), ' -' );
40
-
41
- registerFunc ();
42
- }
43
-
44
- void APIReg::registerFunc () const
45
- {
46
- plugin_register (m_impl.c_str (), m_func->cImpl );
47
- plugin_register (m_vararg.c_str (), m_func->reascriptImpl );
48
- plugin_register (m_help.c_str (), m_func->definition );
39
+ plugin_register ((" -" + m_impl).c_str (), m_func->cImpl );
40
+ plugin_register ((" -" + m_vararg).c_str (), m_func->reascriptImpl );
41
+ plugin_register ((" -" + m_help).c_str (), m_func->definition );
49
42
}
Original file line number Diff line number Diff line change @@ -34,11 +34,9 @@ class APIReg {
34
34
~APIReg ();
35
35
36
36
private:
37
- void registerFunc () const ;
38
-
39
37
const APIFunc *m_func;
40
38
41
- // plugin_register requires these to not be temporaries
39
+ // REAPER < 6.67 requires these strings to remain valid after registering
42
40
std::string m_impl;
43
41
std::string m_vararg;
44
42
std::string m_help;
You can’t perform that action at this time.
0 commit comments