win32: Re-fix the Windows build (namespace pollution via windows.h).
[pulseview.git] / pv / session.cpp
index 45c4e98790843dc67bef475a6be0594b265017b4..e6fb52fd7dd0d589342ed877ee573cbb572a4755 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
+#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>
 
@@ -521,7 +526,7 @@ void Session::feed_in_analog(shared_ptr<Analog> analog)
        const vector<shared_ptr<Channel>> channels = analog->channels();
        const unsigned int channel_count = channels.size();
        const size_t sample_count = analog->num_samples() / channel_count;
-       const float *data = analog->data_pointer();
+       const float *data = static_cast<const float *>(analog->data_pointer());
        bool sweep_beginning = false;
 
        for (auto channel : channels)