summaryrefslogtreecommitdiff
path: root/src/common/microprofile.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-23 14:24:11 -0400
committerLioncash <mathew1800@gmail.com>2019-05-23 14:24:13 -0400
commit11e9bee91d645cba69e936916394a0a03875c878 (patch)
treef27f82a7cfedb748013fa0d6f236f8dd3583d7e2 /src/common/microprofile.cpp
parent943f6da1ac507daec404d593a331cc37c9ab64df (diff)
common/file_util: Make GetCurrentDir() return a std::optional
nullptr was being returned in the error case, which, at a glance may seem perfectly OK... until you realize that std::string has the invariant that it may not be constructed from a null pointer. This means that if this error case was ever hit, then the application would most likely crash from a thrown exception in std::string's constructor. Instead, we can change the function to return an optional value, indicating if a failure occurred.
Diffstat (limited to 'src/common/microprofile.cpp')
0 files changed, 0 insertions, 0 deletions