summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-09-01 06:49:54 -0400
committer Nathan Woods <npwoods@mess.org>2016-09-01 06:49:54 -0400
commit9c06ec0b6a8c8b3cdc0a84f5cbc296747910c058 (patch)
treea012b3cbadd179922416b38d2b0ec3af05915fed /src/lib
parentb60879e595edc98fb12b7990bd3b45188191bbf1 (diff)
Incorporating Vas Crabb feedback
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/flopimg.cpp4
-rw-r--r--src/lib/util/opresolv.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp
index 6ffa7bd6cc2..9fb487ba971 100644
--- a/src/lib/formats/flopimg.cpp
+++ b/src/lib/formats/flopimg.cpp
@@ -224,8 +224,8 @@ floperr_t floppy_create(void *fp, const struct io_procs *procs, const struct Flo
/* if this format expects creation parameters and none were specified, create some */
if (!parameters && format->param_guidelines)
{
- alloc_resolution = std::make_unique<util::option_resolution>(floppy_option_guide);
- if (!alloc_resolution)
+ try { alloc_resolution = std::make_unique<util::option_resolution>(floppy_option_guide); }
+ catch (...)
{
err = FLOPPY_ERROR_OUTOFMEMORY;
goto done;
diff --git a/src/lib/util/opresolv.cpp b/src/lib/util/opresolv.cpp
index fa6e1fa0f28..b707508dcac 100644
--- a/src/lib/util/opresolv.cpp
+++ b/src/lib/util/opresolv.cpp
@@ -116,7 +116,7 @@ option_resolution::entry *option_resolution::find(int parameter)
auto iter = std::find_if(
m_entries.begin(),
m_entries.end(),
- [&](const entry &e) { return e.parameter() == parameter; });
+ [parameter](const entry &e) { return e.parameter() == parameter; });
return iter != m_entries.end()
? &*iter