https://bugs.dolphin-emu.org/https://bugs.dolphin-emu.org/favicon.ico?12010-05-27T07:03:44ZDolphin bug trackerEmulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802812010-05-27T07:03:44Zdeath2droiddeath2droid@gmail.com
<ul></ul><p>Personally I don't really like the way your ini file code works at all.</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802822010-05-27T07:16:44ZBilliard26jordan.woyak@gmail.com
<ul></ul><p><a class="user active user-mention" href="https://bugs.dolphin-emu.org/users/241">@death2droid</a><br>
Can you explain?</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802832010-05-27T07:51:36Zomegadoxomegadox@gmail.com
<ul></ul><p>its pro :P</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802842010-05-27T07:56:22Zhrydgardhrydgard@gmail.com
<ul></ul><p>Inheriting std::map seems mildly crazy and not something I'd ever do. Is that really a <br>
good idea? Isn't it better just to mimic the interface and use an std::map in the <br>
implementation?</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802852010-05-27T08:11:46ZBilliard26jordan.woyak@gmail.com
<ul></ul><p>I thought it made a lot of sense to just inherit it. This way the iterators can be<br>
used, along with all the other map features (find,size,begin...) without needed to<br>
create methods for them. Doing something like this for each needed function seems<br>
silly to me:<br>
size_t IniFile::size() const {return m_internal_map.size();}</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802862010-05-27T19:50:02ZBhaaL
<ul></ul><p>I already said that on IRC, but the presence of [GS]etLines is clearly an indication<br>
of things being used in the wrong way.</p>
<p>Putting aside the fact that it derives from std::map, I'd say it is a good change - but.<br>
But, [GS]etLines should be removed, and code using it should be rewritten to use<br>
something else; and even if it is just the old IniFile code, tailored to its<br>
requirements (i think AR Codes and Debugger BPs use it) - and renamed ofc to make the<br>
changes complete.</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802872010-06-03T05:12:32ZAnonymous
<ul></ul><p>Great, seems like I committed it either without reading this issue or totally <br>
forgetting about it.<br>
Well, sorry...hopefully it will not be too time consuming to fix if the change is just <br>
inside the IniFile class itself.</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802882010-06-03T13:36:33ZAnonymous
<ul></ul><p><a href="http://en.allexperts.com/q/C-1040/possible-inherit-classes-STL.htm" class="external">http://en.allexperts.com/q/C-1040/possible-inherit-classes-STL.htm</a><br>
I think in IniFile's case, it is ok because: we never expect to use Section or <br>
IniFile classes as std::map<> polymorphically, and the inherited classes "are" a <br>
std::map, not "containing" a std::map<>, so it also makes sense from a design point <br>
of view.</p>
Emulator - Emulator Issues #2711: IniFile code replacementhttps://bugs.dolphin-emu.org/issues/2711?journal_id=6802902011-07-10T20:18:06ZAnonymous
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li></ul><p>Ignore this...Status:Verified was removed, changing to Fixed</p>