#include "sweeptimingwidget.hpp"
+#include <cassert>
#include <cstdlib>
-
#include <vector>
-#include <assert.h>
-
#include <extdef.h>
using std::abs;
list_.clear();
for (size_t i = 0; i < count; i++) {
char *const s = sr_si_string_u64(vals[i], suffix_);
- list_.addItem(QString::fromUtf8(s),
- qVariantFromValue(vals[i]));
+ list_.addItem(QString::fromUtf8(s), qVariantFromValue(vals[i]));
g_free(s);
}
uint64_t SweepTimingWidget::value() const
{
- switch(value_type_) {
+ switch (value_type_) {
case None:
return 0;
-
case MinMaxStep:
return (uint64_t)value_.value();
-
case List:
{
const int index = list_.currentIndex();
return (index >= 0) ? list_.itemData(
index).value<uint64_t>() : 0;
}
-
default:
// Unexpected value type
- assert(0);
+ assert(false);
return 0;
}
}
list_.setCurrentIndex(best_match);
}
-} // widgets
-} // pv
+} // namespace widgets
+} // namespace pv