projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GlobalSettings: Remove unneeded include/using
[pulseview.git]
/
pv
/
widgets
/
sweeptimingwidget.cpp
diff --git
a/pv/widgets/sweeptimingwidget.cpp
b/pv/widgets/sweeptimingwidget.cpp
index be2c8b895496eb0d2fa5994e1605533ad45c91d7..b4943225dd8d44ddae54fad59b7231e70a8c6e3f 100644
(file)
--- a/
pv/widgets/sweeptimingwidget.cpp
+++ b/
pv/widgets/sweeptimingwidget.cpp
@@
-19,9
+19,9
@@
#include "sweeptimingwidget.hpp"
#include "sweeptimingwidget.hpp"
+#include <cassert>
#include <cstdlib>
#include <vector>
#include <cstdlib>
#include <vector>
-#include <cassert>
#include <extdef.h>
#include <extdef.h>
@@
-87,8
+87,7
@@
void SweepTimingWidget::show_list(const uint64_t *vals, size_t count)
list_.clear();
for (size_t i = 0; i < count; i++) {
char *const s = sr_si_string_u64(vals[i], suffix_);
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);
}
g_free(s);
}
@@
-138,23
+137,20
@@
void SweepTimingWidget::show_125_list(uint64_t min, uint64_t max)
uint64_t SweepTimingWidget::value() const
{
uint64_t SweepTimingWidget::value() const
{
- switch(value_type_) {
+ switch
(value_type_) {
case None:
return 0;
case None:
return 0;
-
case MinMaxStep:
return (uint64_t)value_.value();
case MinMaxStep:
return (uint64_t)value_.value();
-
case List:
{
const int index = list_.currentIndex();
return (index >= 0) ? list_.itemData(
index).value<uint64_t>() : 0;
}
case List:
{
const int index = list_.currentIndex();
return (index >= 0) ? list_.itemData(
index).value<uint64_t>() : 0;
}
-
default:
// Unexpected value type
default:
// Unexpected value type
- assert(
0
);
+ assert(
false
);
return 0;
}
}
return 0;
}
}
@@
-178,5
+174,5
@@
void SweepTimingWidget::set_value(uint64_t value)
list_.setCurrentIndex(best_match);
}
list_.setCurrentIndex(best_match);
}
-}
//
widgets
-}
//
pv
+}
// namespace
widgets
+}
// namespace
pv