Skip to content

Commit 86b1fdd

Browse files
committed
Updated to latest scopehal, fixed more cppcheck issues
1 parent da3f577 commit 86b1fdd

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/ngscopeclient/FilterPropertiesDialog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,7 @@ bool FilterPropertiesDialog::DoParameter(FilterParameter& param, string name, ma
294294
{
295295
//If we don't have a temporary value, make one
296296
auto nval = param.GetFloatVal();
297-
if(tempValues.find(name) == tempValues.end())
298-
tempValues[name] = param.GetUnit().PrettyPrint(nval);
297+
tempValues.try_emplace(name, param.GetUnit().PrettyPrint(nval));
299298

300299
//Input path
301300
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 12);

src/ngscopeclient/NFDFileBrowser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2026 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -61,7 +61,7 @@ NFDFileBrowser::NFDFileBrowser(
6161
//Trim off filter name
6262
size_t iparen = m_filterName.find('(');
6363
if(iparen != string::npos)
64-
m_filterName = m_filterName.substr(0, iparen);
64+
m_filterName.resize(iparen);
6565

6666
m_filterMask = filterMask.substr(2);
6767

0 commit comments

Comments
 (0)