summaryrefslogtreecommitdiff
path: root/src/core/gdbstub/gdbstub.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-06 14:12:57 -0400
committerGravatar Lioncash2018-08-06 14:17:13 -0400
commit2b2dc00bfd3410bdce16966b1448fac36dd3126d (patch)
tree19a37e3239029a34164807362d16714edad34b0e /src/core/gdbstub/gdbstub.cpp
parentMerge pull request #933 from lioncash/memory (diff)
downloadyuzu-2b2dc00bfd3410bdce16966b1448fac36dd3126d.tar.gz
yuzu-2b2dc00bfd3410bdce16966b1448fac36dd3126d.tar.xz
yuzu-2b2dc00bfd3410bdce16966b1448fac36dd3126d.zip
qt/main: Better file-existence checking within OnMenuRecentFile() and UpdateUITheme()
In OnMenuRecentFile() we don't need to construct a QFileInfo instance just to check if a file exists, we can just use the static member function to do that (which Qt's documentation also notes as quicker than constructing an instance). In UpdateUITheme(), we just want to try and open the file and check the success of that operation. Technically speaking, between the existence check and the open call, the file can be deleted or moved, but still appear to succeed in code. i.e. 1. Existence check -> Returns true 2. File is moved/deleted 3. Open is called, the return value of which isn't checked 4. Nonsense behavior This way we combine the existence check and the open into one.
Diffstat (limited to 'src/core/gdbstub/gdbstub.cpp')
0 files changed, 0 insertions, 0 deletions