~dcplusplus-team/dcpp-plugin-sdk-cpp/ScriptPlugin

« back to all changes in this revision

Viewing changes to src/ScriptInstance.cpp

  • Committer: crise
  • Date: 2013-06-13 22:48:21 UTC
  • Revision ID: crise@apexdc.net-20130613224821-mi73q6xjsgcda5dg
eliminate some superfluous casts and don't remove hubs twice.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
}
79
79
 
80
80
// Get value from top of stack, check if should cancel message.
81
 
Bool ScriptInstance::GetLuaBool() {
 
81
bool ScriptInstance::GetLuaBool() {
82
82
        bool ret = false;
83
83
        if (lua_gettop(L) > 0) {
84
84
                ret = !lua_isnil(L, -1);
85
85
                lua_pop(L, 1);
86
86
        }
87
87
 
88
 
        return ret ? True : False;
 
88
        return ret;
89
89
}
90
90
 
91
91
void ScriptInstance::EvaluateChunk(const string& chunk) {