Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 68be468c6282
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bb0cfbdc9160
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 24, 2020

  1. Copy the full SHA
    ce0e662 View commit details

Commits on Sep 25, 2020

  1. Merge pull request #265 from bvernoux/patch-1

    Refactor basename() to string_base_name()
    azonenberg authored Sep 25, 2020
    Copy the full SHA
    bb0cfbd View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 scopeprotocols/ChannelEmulationFilter.cpp
8 changes: 6 additions & 2 deletions scopeprotocols/ChannelEmulationFilter.cpp
Original file line number Diff line number Diff line change
@@ -33,6 +33,11 @@

using namespace std;

inline string string_base_name(string const & path)
{
return path.substr(path.find_last_of("/\\") + 1);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Construction / destruction

@@ -49,7 +54,6 @@ string ChannelEmulationFilter::GetProtocolName()
return "Channel Emulation";
}


void ChannelEmulationFilter::SetDefaultName()
{
vector<string> fnames = m_parameters[m_fname].GetFileNames();
@@ -58,7 +62,7 @@ void ChannelEmulationFilter::SetDefaultName()
{
if(base != "")
base += ", ";
base += basename(f.c_str());
base += string_base_name(f);
}

char hwname[256];