X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCmdDef.cpp;h=08cd7dd6a928e01812904f2eb4e854bbfc97f2e0;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=a5ac6cf2d4e0838c8e8537599d2404e4aef59b60;hpb=e1453ef6873b8c6d371a62471c5d309154133866;p=lyx.git diff --git a/src/CmdDef.cpp b/src/CmdDef.cpp index a5ac6cf2d4..08cd7dd6a9 100644 --- a/src/CmdDef.cpp +++ b/src/CmdDef.cpp @@ -12,6 +12,7 @@ #include "CmdDef.h" +#include "FuncRequest.h" #include "LyXAction.h" #include "Lexer.h" @@ -20,7 +21,6 @@ #include "support/filetools.h" #include "support/lstrings.h" -#include #include using namespace std; @@ -100,8 +100,8 @@ bool CmdDef::read(string const & def_file) } case BN_DEFFILE: if (lex.next()) { - string const tmp = lex.getString(); - error |= !read(tmp); + string const stmp = lex.getString(); + error |= !read(stmp); } else { lex.printError("BN_DEFFILE: Missing file name"); error = true; @@ -152,20 +152,20 @@ void CmdDef::release(string const & name) } -CmdDef::newCmdDefResult CmdDef::newCmdDef(string const & name, - string const & def) +CmdDef::newCmdDefResult CmdDef::newCmdDef(string const & name, + string const & def) { string const name2 = trim(name); - if (name2.empty()) + if (name2.empty()) return CmdDefNameEmpty; if (cmdDefMap.find(name) != cmdDefMap.end()) return CmdDefExists; FuncRequest func = lyxaction.lookupFunc(def); - if (func.action == LFUN_NOACTION - || func.action == LFUN_UNKNOWN_ACTION) { + if (func.action() == LFUN_NOACTION + || func.action() == LFUN_UNKNOWN_ACTION) { return CmdDefInvalid; }