]> sigrok.org Git - pulseview.git/blobdiff - pv/view/rowitemiterator.hpp
Reduce include bloat by including boost/thread/{locks,shared_mutex}.hpp directly
[pulseview.git] / pv / view / rowitemiterator.hpp
index 577b471318bd8255cf4361fd90d5b6c84cb46f2a..10de80a03060bde9323eb4e549ff1aede26b4a49 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PULSEVIEW_PV_VIEW_ROWITEMITERATOR_H
-#define PULSEVIEW_PV_VIEW_ROWITEMITERATOR_H
+#ifndef PULSEVIEW_PV_VIEW_ROWITEMITERATOR_HPP
+#define PULSEVIEW_PV_VIEW_ROWITEMITERATOR_HPP
 
 #include <algorithm>
 #include <cassert>
 #include <type_traits>
 #include <vector>
 
-#include <boost/thread.hpp>
+#ifdef _WIN32
+// Windows: Avoid namespace pollution by thread.hpp (which includes windows.h).
+#define NOGDI
+#define NORESOURCE
+#endif
+#include <boost/thread/locks.hpp>
+#include <boost/thread/shared_mutex.hpp>
 
 #include <pv/session.hpp>
 
@@ -140,4 +146,4 @@ void swap(RowItemIterator<Owner, Item>& a, RowItemIterator<Owner, Item>& b)
 } // namespace view
 } // namespace pv
 
-#endif // PULSEVIEW_PV_VIEW_ROWITEMITERATOR_H
+#endif // PULSEVIEW_PV_VIEW_ROWITEMITERATOR_HPP