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

Commits on Oct 12, 2020

  1. More const-ification

    azonenberg committed Oct 12, 2020
    Copy the full SHA
    d9347cc View commit details
Showing with 5 additions and 4 deletions.
  1. +1 −1 scopehal/OscilloscopeChannel.h
  2. +1 −1 scopehal/Unit.cpp
  3. +1 −1 scopehal/Unit.h
  4. +2 −1 scopehal/scopehal.cpp
2 changes: 1 addition & 1 deletion scopehal/OscilloscopeChannel.h
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ class OscilloscopeChannel
/**
@brief Adds a new data stream to the channel
*/
void AddStream(std::string name)
void AddStream(const std::string& name)
{
m_streamNames.push_back(name);
m_streamData.push_back(NULL);
2 changes: 1 addition & 1 deletion scopehal/Unit.cpp
Original file line number Diff line number Diff line change
@@ -226,7 +226,7 @@ string Unit::PrettyPrint(double value)
/**
@brief Parses a string based on the supplied unit
*/
double Unit::ParseString(string str)
double Unit::ParseString(const string& str)
{
//Find the first non-numeric character in the strnig
double scale = 1;
2 changes: 1 addition & 1 deletion scopehal/Unit.h
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ class Unit
{}

std::string PrettyPrint(double value);
double ParseString(std::string str);
double ParseString(const std::string& str);

UnitType GetType()
{ return m_type; }
3 changes: 2 additions & 1 deletion scopehal/scopehal.cpp
Original file line number Diff line number Diff line change
@@ -141,7 +141,8 @@ string GetDefaultChannelColor(int i)
const int NUM_COLORS = 12;
static const char* colorTable[NUM_COLORS] =
{
"#a6cee3", //cppcheck suppress constStatement
// cppcheck-suppress constStatement
"#a6cee3",
"#1f78b4",
"#b2df8a",
"#33a02c",