Skip to content

Commit 96fd7b1

Browse files
committed
Fix some MSVC warnings
1 parent 5f31282 commit 96fd7b1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/data_receiver.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ namespace lsl {
2727
* @param max_chunklen Optionally the maximum size, in samples, at which chunks are transmitted (the default corresponds to the chunk sizes used by the sender).
2828
* Recording applications can use a generous size here (leaving it to the network how to pack things), while real-time applications may want a finer (perhaps 1-sample) granularity.
2929
*/
30-
data_receiver::data_receiver(inlet_connection &conn, int max_buflen, int max_chunklen): conn_(conn), check_thread_start_(true), closing_stream_(false), connected_(false), sample_queue_(max_buflen),
31-
sample_factory_(new factory(conn.type_info().channel_format(),conn.type_info().channel_count(),conn.type_info().nominal_srate()?conn.type_info().nominal_srate()*api_config::get_instance()->inlet_buffer_reserve_ms()/1000:api_config::get_instance()->inlet_buffer_reserve_samples())), max_buflen_(max_buflen), max_chunklen_(max_chunklen)
32-
{
30+
data_receiver::data_receiver(inlet_connection &conn, int max_buflen, int max_chunklen)
31+
: conn_(conn), check_thread_start_(true), closing_stream_(false), connected_(false),
32+
sample_queue_(max_buflen),
33+
sample_factory_(
34+
new factory(conn.type_info().channel_format(), conn.type_info().channel_count(),
35+
conn.type_info().nominal_srate()
36+
? static_cast<int>(conn.type_info().nominal_srate() *
37+
api_config::get_instance()->inlet_buffer_reserve_ms() / 1000)
38+
: api_config::get_instance()->inlet_buffer_reserve_samples())),
39+
max_buflen_(max_buflen), max_chunklen_(max_chunklen) {
3340
if (max_buflen < 0)
3441
throw std::invalid_argument("The max_buflen argument must not be smaller than 0.");
3542
if (max_chunklen < 0)

src/lsl_outlet_c.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "stream_outlet_impl.h"
22

3+
#pragma warning(disable : 4800)
34

45
extern "C" {
56
#include "api_types.hpp"

0 commit comments

Comments
 (0)