Lines Matching refs:instr
98 int32_t ScriptInstructionHelper::AddInstruction(const std::string &instrName, const UScriptInstructionPtr instr)
104 return scriptManager_->AddInstruction(instrName, instr);
112 UScriptInstructionPtr instr = nullptr;
113 int32_t ret = factory->CreateInstructionInstance(instr, instrName);
114 if (ret != USCRIPT_SUCCESS || instr == nullptr) {
120 ret = AddInstruction(instrName, instr);
124 // ret is USCRIPT_ERROR_REVERED, instr register failed, can be deleted
125 delete instr;
126 instr = nullptr;
128 // ScriptManagerImpl::AddInstruction has saved instr, don't delete it here!!!
192 UScriptInstructionPtr instr = nullptr;
193 int32_t ret = factory->CreateInstructionInstance(instr, instrName);
194 if (ret != USCRIPT_SUCCESS || instr == nullptr) {
196 // when instr == nullptr && ret == USCRIPT_SUCCESS, shouldn't return USCRIPT_SUCCESS
200 ret = AddInstruction(instrName, instr);
203 delete instr;
204 instr = nullptr;