| Anonymous | Login | Signup for a new account | 2013-05-18 19:17 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Repositories |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0002467 | Spring engine | Lua | public | 2011-06-12 04:47 | 2011-06-21 21:22 | ||||
| Reporter | abma | ||||||||
| Assigned To | abma | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | resolved | Resolution | fixed | ||||||
| Product Version | 0.82.7+git | ||||||||
| Target Version | 83.0 | Fixed in Version | |||||||
| Summary | 0002467: Remove remaining .n's | ||||||||
| Description | and break more lua-code... this will improve performance, cleanup & simplify coding. (at least i hope so...) | ||||||||
| Additional Information | see minutes: http://springrts.com/phpbb/viewtopic.php?f=12&t=26199 [^] | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
Notes |
|
|
(0006731) abma (administrator) 2011-06-12 04:53 edited on: 2011-06-12 04:54 |
I'm unsure if this are all places where it needs to be removed: rts/Lua $ grep -R \"n\" . ./LuaRules.cpp: HSTR_PUSH_NUMBER(L, "n", cmd.params.size()); ./LuaUnitDefs.cpp: HSTR_PUSH_NUMBER(L, "n", count); ./LuaUnitDefs.cpp: HSTR_PUSH_NUMBER(L, "n", weaponCount); ./LuaUnitDefs.cpp: HSTR_PUSH_NUMBER(L, "n", soundCount); ./LuaSyncedRead.cpp:static const LuaHashString hs_n("n"); ./LuaSyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", localModel->pieces.size()); ./LuaSyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", op.childs.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", count); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", v.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", unitDefMap.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", countMap.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", cmdDescCount); ./LuaUnsyncedRead.cpp: lua_pushstring(L, "n"); ./LuaUnsyncedRead.cpp: lua_pushstring(L, "n"); ./LuaUnsyncedRead.cpp: lua_pushstring(L, "n"); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", count); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", v.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", unitDefMap.size()); ./LuaUnsyncedRead.cpp: HSTR_PUSH_NUMBER(L, "n", countMap.size()); ./LuaWeaponDefs.cpp: HSTR_PUSH_NUMBER(L, "n", soundCount); ./LuaOpenGL.cpp: else if ((key == "n") || (key == "normal")) { ./LuaUtils.cpp: if (dir == "n") { return 2; } ./LuaUtils.cpp: // params["n"] = numParams ./LuaUtils.cpp: HSTR_PUSH_NUMBER(L, "n", numParams); ./LuaVFS.cpp: lua_pushstring(L, "n"); |
|
(0006732) abma (administrator) 2011-06-12 05:16 edited on: 2011-06-12 05:17 |
major priority because this breaks many lua-scripts... for example the morphing-script is affected. these should be replaced before a release. |
|
(0006735) FLOZi (reporter) 2011-06-12 15:12 |
morphing script is easy to fix as the place .n is used is with an array, so # operator can be used instead. Less nice is if there are any situations where maps are returned by the engine. Only way to count their elements without .n is to use a loop with pairs(), which can be slow, especially for large tables. |
|
(0006799) abma (administrator) 2011-06-21 21:22 |
thanks hoijui! https://github.com/spring/spring/commit/1874b58f97d7cfab84decdb4ff5f36a810fa9336 [^] |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-06-12 04:47 | abma | New Issue | |
| 2011-06-12 04:47 | abma | Graphics Card | => unknown |
| 2011-06-12 04:48 | abma | Target Version | => 0.83.0 |
| 2011-06-12 04:51 | abma | Relationship added | has duplicate 0002456 |
| 2011-06-12 04:53 | abma | Note Added: 0006731 | |
| 2011-06-12 04:54 | abma | Note Edited: 0006731 | |
| 2011-06-12 05:16 | abma | Note Added: 0006732 | |
| 2011-06-12 05:16 | abma | Severity | tweak => major |
| 2011-06-12 05:17 | abma | Note Edited: 0006732 | |
| 2011-06-12 15:12 | FLOZi | Note Added: 0006735 | |
| 2011-06-21 21:22 | abma | Note Added: 0006799 | |
| 2011-06-21 21:22 | abma | Status | new => resolved |
| 2011-06-21 21:22 | abma | Resolution | open => fixed |
| 2011-06-21 21:22 | abma | Assigned To | => abma |
| Copyright © 2000 - 2013 MantisBT Team |