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

Commits on Oct 12, 2020

  1. Removed duplicate mutex

    azonenberg committed Oct 12, 2020
    Copy the full SHA
    32a4576 View commit details
  2. Copy the full SHA
    e3098a6 View commit details
  3. Const-ified more strings

    azonenberg committed Oct 12, 2020
    Copy the full SHA
    85be466 View commit details
  4. Copy the full SHA
    c479ee7 View commit details
Showing with 15 additions and 13 deletions.
  1. +1 −1 graphwidget
  2. +0 −2 scopehal/AntikernelLogicAnalyzer.h
  3. +8 −4 scopehal/FilterParameter.cpp
  4. +3 −3 scopehal/FilterParameter.h
  5. +3 −3 scopehal/scopehal.cpp
2 changes: 1 addition & 1 deletion graphwidget
Submodule graphwidget updated 1 files
+6 −6 Graph.cpp
2 changes: 0 additions & 2 deletions scopehal/AntikernelLogicAnalyzer.h
Original file line number Diff line number Diff line change
@@ -110,8 +110,6 @@ class AntikernelLogicAnalyzer
bool m_triggerArmed;
bool m_triggerOneShot;

std::recursive_mutex m_mutex;

std::vector<size_t> m_lowIndexes;
std::vector<size_t> m_highIndexes;

12 changes: 8 additions & 4 deletions scopehal/FilterParameter.cpp
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ FilterParameter::FilterParameter(ParameterTypes type, Unit unit)

}

void FilterParameter::ParseString(string str)
void FilterParameter::ParseString(const string& str)
{
switch(m_type)
{
@@ -89,7 +89,6 @@ void FilterParameter::ParseString(string str)

//Split out semicolon-delimited filenames
string tmp;
str += ';';
for(size_t i=0; i<str.length(); i++)
{
if(str[i] ==';')
@@ -106,6 +105,11 @@ void FilterParameter::ParseString(string str)

tmp += str[i];
}
if(tmp != "")
{
m_string = tmp;
m_filenames.push_back(tmp);
}
}
break;

@@ -197,7 +201,7 @@ void FilterParameter::SetFloatVal(float f)
m_filenames.clear();
}

void FilterParameter::SetFileName(string f)
void FilterParameter::SetFileName(const string& f)
{
m_intval = 0;
m_floatval = 0;
@@ -206,7 +210,7 @@ void FilterParameter::SetFileName(string f)
m_filenames.push_back(f);
}

void FilterParameter::SetFileNames(vector<string> names)
void FilterParameter::SetFileNames(const vector<string>& names)
{
m_intval = 0;
m_floatval = 0;
6 changes: 3 additions & 3 deletions scopehal/FilterParameter.h
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ class FilterParameter

FilterParameter(ParameterTypes type = FilterParameter::TYPE_FLOAT, Unit unit = Unit(Unit::UNIT_PS));

void ParseString(std::string str);
void ParseString(const std::string& str);
std::string ToString();

bool GetBoolVal()
@@ -67,8 +67,8 @@ class FilterParameter
{ m_intval = b; }
void SetIntVal(int64_t i);
void SetFloatVal(float f);
void SetFileName(std::string f);
void SetFileNames(std::vector<std::string> names);
void SetFileName(const std::string& f);
void SetFileNames(const std::vector<std::string>& names);

ParameterTypes GetType()
{ return m_type; }
6 changes: 3 additions & 3 deletions scopehal/scopehal.cpp
Original file line number Diff line number Diff line change
@@ -139,9 +139,9 @@ void DriverStaticInit()
string GetDefaultChannelColor(int i)
{
const int NUM_COLORS = 12;
static const char* colorTable[NUM_COLORS]=
static const char* colorTable[NUM_COLORS] =
{
"#a6cee3",
"#a6cee3", //cppcheck suppress constStatement
"#1f78b4",
"#b2df8a",
"#33a02c",
@@ -181,7 +181,7 @@ void InitializePlugins()
search_dirs.push_back("/usr/local/lib/scopehal/plugins/");

//current binary dir
char selfPath[1024] = {0};
char selfPath[1024] = "";
ssize_t readlinkReturn = readlink("/proc/self/exe", selfPath, (sizeof(selfPath) - 1) );
if ( readlinkReturn > 0)
search_dirs.push_back(dirname(selfPath));