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: bb0cfbdc9160
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 32d962900009
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Sep 25, 2020

  1. Merged multiple implementations of string_base_name, renamed to BaseN…

    …ame to fit general project naming convention
    azonenberg committed Sep 25, 2020
    Copy the full SHA
    32d9629 View commit details
Showing with 8 additions and 12 deletions.
  1. +5 −0 scopehal/scopehal.cpp
  2. +1 −0 scopehal/scopehal.h
  3. +1 −6 scopeprotocols/ChannelEmulationFilter.cpp
  4. +1 −6 scopeprotocols/DeEmbedFilter.cpp
5 changes: 5 additions & 0 deletions scopehal/scopehal.cpp
Original file line number Diff line number Diff line change
@@ -349,3 +349,8 @@ string Trim(string str)

return ret;
}

string BaseName(string const & path)
{
return path.substr(path.find_last_of("/\\") + 1);
}
1 change: 1 addition & 0 deletions scopehal/scopehal.h
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ uint64_t ConvertVectorSignalToScalar(std::vector<bool> bits);
std::string GetDefaultChannelColor(int i);

std::string Trim(std::string str);
std::string BaseName(std::string const& path);

void TransportStaticInit();
void DriverStaticInit();
7 changes: 1 addition & 6 deletions scopeprotocols/ChannelEmulationFilter.cpp
Original file line number Diff line number Diff line change
@@ -33,11 +33,6 @@

using namespace std;

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

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

@@ -62,7 +57,7 @@ void ChannelEmulationFilter::SetDefaultName()
{
if(base != "")
base += ", ";
base += string_base_name(f);
base += BaseName(f);
}

char hwname[256];
7 changes: 1 addition & 6 deletions scopeprotocols/DeEmbedFilter.cpp
Original file line number Diff line number Diff line change
@@ -33,11 +33,6 @@

using namespace std;

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

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

@@ -145,7 +140,7 @@ void DeEmbedFilter::SetDefaultName()
{
if(base != "")
base += ", ";
base += string_base_name(f);
base += BaseName(f);
}

char hwname[256];