Skip to content

Commit

Permalink
Replace usage of C++ keywords 'and or not' with corresponding symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
wo80 committed Jan 1, 2024
1 parent b510967 commit 38bd16b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/algorithms/audioproblems/humdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ AlgorithmStatus HumDetector::process() {
peakBins[j] = salienceBins;
peakSaliences[j] = salienceValues;

if (not salienceBins.empty())
if (!salienceBins.empty())
peakBinsNotEmpty = true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/machinelearning/tensorflowpredict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ void TensorflowPredict::configure() {
_savedModel = parameter("savedModel").toString();
_graphFilename = parameter("graphFilename").toString();

if ((_savedModel.empty()) and (_graphFilename.empty()) and (_isConfigured)) {
if ((_savedModel.empty()) && (_graphFilename.empty()) && (_isConfigured)) {
E_WARNING("TensorflowPredict: You are trying to update a valid configuration with invalid parameters. "
"If you want to update the configuration specify a valid `graphFilename` or `savedModel` parameter.");
};

// Do not do anything if we did not get a non-empty model name.
if ((_savedModel.empty()) and (_graphFilename.empty())) return;
if ((_savedModel.empty()) && (_graphFilename.empty())) return;

_tags = parameter("tags").toVectorString();

Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/standard/vectorrealtotensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void VectorRealToTensor::configure() {
_timeStamps = shape[2];
_frame.setAcquireSize(_timeStamps);

if ((shape[0] == -1) or (shape[0] == 0)) {
if ((shape[0] == -1) || (shape[0] == 0)) {
_accumulate = true;
}

Expand Down Expand Up @@ -218,7 +218,7 @@ AlgorithmStatus VectorRealToTensor::process() {

// or if we have reached the end of the stream with lastBatchModel = "push"
// and there are not enough patches to fill a regular batch.
} else if (shouldStop() and _acc.size() < _shape[0]) {
} else if (shouldStop() && _acc.size() < _shape[0]) {
reshapeBatch = true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/algorithms/tonal/key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void Key::resize(int pcpsize) {
// just like a cross-correlation
Real Key::correlation(const vector<Real>& v1, const Real mean1, const Real std1, const vector<Real>& v2, const Real mean2, const Real std2, const int shift) const
{
if (std1 == static_cast<Real>(0.0) or std2 == static_cast<Real>(0.0))
if (std1 == static_cast<Real>(0.0) || std2 == static_cast<Real>(0.0))
{
return 0.0;
}
Expand Down

0 comments on commit 38bd16b

Please sign in to comment.