Create a saveSettingAndWriteToUserConfig() function to absorb some duplication in the gui
Patch By: ffffffff
Comments By: leper, mimo
Differential Revision: https://code.wildfiregames.com/D1211
Create a saveSettingAndWriteToUserConfig() function to absorb some duplication…
Description
Details
Event Timeline
Comment Actions Remove the concern if you disagree with this being worthy of a concern. While the patch gave the advantage of shortening the code, every line of the patch should be different:
About the repetition of config/user.cfg in the previous ConfigDB_WriteValueToFile calls, maybe it could be considered a bug, not a feature that one can call the function with different paths but the same namespace. At least it could use the default filepath if no filepath was specified. So saveSettingAndWriteToUserConfig("gui.splashscreen.version", Engine.GetFileMTime("gui/splashscreen/splashscreen.txt")); were Engine.ConfigDB_CreateAndWriteValueToFile("user", "gui.splashscreen.version", Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"));
|