On Fri, Sep 7, 2018 at 12:03 PM, Huw Davies huw@codeweavers.com wrote:
On Thu, Sep 06, 2018 at 09:26:15PM +0300, Gabriel Ivăncescu wrote:
How exactly is this simplifiying the code? It looks like it's just adding code to me.
Well when txtbackup is used currently (when using the arrow keys), there's no check for NULL so I think the current code is wrong. Instead of adding a check for NULL there, this simplifies it.
Please note that this will be more evident later in the patch series when I add the IACList::Expand usage. Instead of checking for NULL everytime which really only happens the first time it is ever used, I just initialize it to something non-NULL. Less overhead and less redundancy (no need to check for NULL twice later).
It probably doesn't make sense directly since it was split from the larger patch which sets txtbackup to hwndText (so it can never be NULL after the first time). Should I move it after the WM_KEYDOWN patch in the series?