#include <map>
+#ifdef _WIN32
+// Windows: Avoid boost/thread namespace pollution (which includes windows.h).
+#define NOGDI
+#define NORESOURCE
+#endif
#include <boost/thread/locks.hpp>
#include <boost/thread/shared_mutex.hpp>
signal_map[sig->channel()] = sig;
// Populate channel groups
- for (auto entry : device->channel_groups())
- {
+ for (auto entry : device->channel_groups()) {
shared_ptr<ChannelGroup> group = entry.second;
// Make a set of signals, and removed this signals from the
// signal map.
vector< shared_ptr<Signal> > group_sigs;
- for (auto channel : group->channels())
- {
+ for (auto channel : group->channels()) {
const auto iter = signal_map.find(channel);
if (iter == signal_map.end())
// Make a vector of the remaining channels
vector< shared_ptr<Signal> > global_sigs;
- for (auto channel : device->channels())
- {
+ for (auto channel : device->channels()) {
const map<shared_ptr<Channel>, shared_ptr<Signal> >::
const_iterator iter = signal_map.find(channel);
if (iter != signal_map.end())
updating_channels_ = true;
for (map<QCheckBox*, shared_ptr<Signal> >::const_iterator i =
- check_box_signal_map_.begin();
- i != check_box_signal_map_.end(); i++)
- {
+ check_box_signal_map_.begin();
+ i != check_box_signal_map_.end(); i++) {
const shared_ptr<Signal> sig = (*i).second;
assert(sig);
int row = 0, col = 0;
QGridLayout *const grid = new QGridLayout();
- for (const shared_ptr<pv::view::Signal>& sig : sigs)
- {
+ for (const shared_ptr<pv::view::Signal>& sig : sigs) {
assert(sig);
QCheckBox *const checkbox = new QCheckBox(sig->name());
return grid;
}
-void Channels::showEvent(QShowEvent *e)
+void Channels::showEvent(QShowEvent *event)
{
- pv::widgets::Popup::showEvent(e);
+ pv::widgets::Popup::showEvent(event);
updating_channels_ = true;
for (map<QCheckBox*, shared_ptr<Signal> >::const_iterator i =
- check_box_signal_map_.begin();
- i != check_box_signal_map_.end(); i++)
- {
+ check_box_signal_map_.begin();
+ i != check_box_signal_map_.end(); i++) {
const shared_ptr<Signal> sig = (*i).second;
assert(sig);