Skip to content

Commit

Permalink
style: Replace spaces with tabs for consistent indentation across files
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjiequan committed Feb 23, 2024
1 parent 9b97cec commit fb24157
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions emmy_debugger/src/debugger/emmy_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1431,25 +1431,25 @@ void Debugger::ExecuteOnLuaThread(const Executor &exec) {
}

int Debugger::GetTypeFromName(const char* typeName) {
if (strcmp(typeName, "nil") == 0) return LUA_TNIL;
if (strcmp(typeName, "boolean") == 0) return LUA_TBOOLEAN;
if (strcmp(typeName, "lightuserdata") == 0) return LUA_TLIGHTUSERDATA;
if (strcmp(typeName, "number") == 0) return LUA_TNUMBER;
if (strcmp(typeName, "string") == 0) return LUA_TSTRING;
if (strcmp(typeName, "table") == 0) return LUA_TTABLE;
if (strcmp(typeName, "function") == 0) return LUA_TFUNCTION;
if (strcmp(typeName, "userdata") == 0) return LUA_TUSERDATA;
if (strcmp(typeName, "thread") == 0) return LUA_TTHREAD;
return -1; // 未知类型
if (strcmp(typeName, "nil") == 0) return LUA_TNIL;
if (strcmp(typeName, "boolean") == 0) return LUA_TBOOLEAN;
if (strcmp(typeName, "lightuserdata") == 0) return LUA_TLIGHTUSERDATA;
if (strcmp(typeName, "number") == 0) return LUA_TNUMBER;
if (strcmp(typeName, "string") == 0) return LUA_TSTRING;
if (strcmp(typeName, "table") == 0) return LUA_TTABLE;
if (strcmp(typeName, "function") == 0) return LUA_TFUNCTION;
if (strcmp(typeName, "userdata") == 0) return LUA_TUSERDATA;
if (strcmp(typeName, "thread") == 0) return LUA_TTHREAD;
return -1; // 未知类型
}

bool Debugger::RegisterTypeName(const std::string& typeName, std::string& err) {
int type = GetTypeFromName(typeName.c_str());
if (type == -1) {
err = "Unknown type name: " + typeName;
return false;
}
int type = GetTypeFromName(typeName.c_str());
if (type == -1) {
err = "Unknown type name: " + typeName;
return false;
}
displayCustomTypeInfo = true;
registeredTypes.set(type);
return true;
registeredTypes.set(type);
return true;
}

0 comments on commit fb24157

Please sign in to comment.