@@ -1431,25 +1431,25 @@ void Debugger::ExecuteOnLuaThread(const Executor &exec) {
14311431}
14321432
14331433int Debugger::GetTypeFromName (const char * typeName) {
1434- if (strcmp (typeName, " nil" ) == 0 ) return LUA_TNIL;
1435- if (strcmp (typeName, " boolean" ) == 0 ) return LUA_TBOOLEAN;
1436- if (strcmp (typeName, " lightuserdata" ) == 0 ) return LUA_TLIGHTUSERDATA;
1437- if (strcmp (typeName, " number" ) == 0 ) return LUA_TNUMBER;
1438- if (strcmp (typeName, " string" ) == 0 ) return LUA_TSTRING;
1439- if (strcmp (typeName, " table" ) == 0 ) return LUA_TTABLE;
1440- if (strcmp (typeName, " function" ) == 0 ) return LUA_TFUNCTION;
1441- if (strcmp (typeName, " userdata" ) == 0 ) return LUA_TUSERDATA;
1442- if (strcmp (typeName, " thread" ) == 0 ) return LUA_TTHREAD;
1443- return -1 ; // 未知类型
1434+ if (strcmp (typeName, " nil" ) == 0 ) return LUA_TNIL;
1435+ if (strcmp (typeName, " boolean" ) == 0 ) return LUA_TBOOLEAN;
1436+ if (strcmp (typeName, " lightuserdata" ) == 0 ) return LUA_TLIGHTUSERDATA;
1437+ if (strcmp (typeName, " number" ) == 0 ) return LUA_TNUMBER;
1438+ if (strcmp (typeName, " string" ) == 0 ) return LUA_TSTRING;
1439+ if (strcmp (typeName, " table" ) == 0 ) return LUA_TTABLE;
1440+ if (strcmp (typeName, " function" ) == 0 ) return LUA_TFUNCTION;
1441+ if (strcmp (typeName, " userdata" ) == 0 ) return LUA_TUSERDATA;
1442+ if (strcmp (typeName, " thread" ) == 0 ) return LUA_TTHREAD;
1443+ return -1 ; // 未知类型
14441444}
14451445
14461446bool Debugger::RegisterTypeName (const std::string& typeName, std::string& err) {
1447- int type = GetTypeFromName (typeName.c_str ());
1448- if (type == -1 ) {
1449- err = " Unknown type name: " + typeName;
1450- return false ;
1451- }
1447+ int type = GetTypeFromName (typeName.c_str ());
1448+ if (type == -1 ) {
1449+ err = " Unknown type name: " + typeName;
1450+ return false ;
1451+ }
14521452 displayCustomTypeInfo = true ;
1453- registeredTypes.set (type);
1454- return true ;
1453+ registeredTypes.set (type);
1454+ return true ;
14551455}
0 commit comments