@@ -93,7 +93,7 @@ lsl::sample::~sample() noexcept {
9393}
9494
9595bool sample::operator ==(const sample &rhs) const noexcept {
96- if ((timestamp != rhs.timestamp ) || (format_ != rhs.format_ ) ||
96+ if ((timestamp_ != rhs.timestamp_ ) || (format_ != rhs.format_ ) ||
9797 (num_channels_ != rhs.num_channels_ ))
9898 return false ;
9999 if (format_ != cft_string)
@@ -189,11 +189,11 @@ template <typename T> void save_value(std::streambuf &sb, T v, bool reverse_byte
189189void sample::save_streambuf (
190190 std::streambuf &sb, int /* protocol_version*/ , bool reverse_byte_order, void *scratchpad) const {
191191 // write sample header
192- if (timestamp == DEDUCED_TIMESTAMP) {
192+ if (timestamp_ == DEDUCED_TIMESTAMP) {
193193 save_byte (sb, TAG_DEDUCED_TIMESTAMP);
194194 } else {
195195 save_byte (sb, TAG_TRANSMITTED_TIMESTAMP);
196- save_value (sb, timestamp , reverse_byte_order);
196+ save_value (sb, timestamp_ , reverse_byte_order);
197197 }
198198 // write channel data
199199 if (format_ == cft_string) {
@@ -231,10 +231,10 @@ void sample::load_streambuf(
231231 // read sample header
232232 if (load_byte (sb) == TAG_DEDUCED_TIMESTAMP)
233233 // deduce the timestamp
234- timestamp = DEDUCED_TIMESTAMP;
234+ timestamp_ = DEDUCED_TIMESTAMP;
235235 else
236236 // read the time stamp
237- timestamp = load_value<double >(sb, reverse_byte_order);
237+ timestamp_ = load_value<double >(sb, reverse_byte_order);
238238
239239 // read channel data
240240 if (format_ == cft_string) {
@@ -329,10 +329,10 @@ template <class Archive> void sample::serialize_channels(Archive &ar, const uint
329329
330330void lsl::sample::serialize (eos::portable_oarchive &ar, const uint32_t archive_version) const {
331331 // write sample header
332- if (timestamp == DEDUCED_TIMESTAMP) {
332+ if (timestamp_ == DEDUCED_TIMESTAMP) {
333333 ar &TAG_DEDUCED_TIMESTAMP;
334334 } else {
335- ar &TAG_TRANSMITTED_TIMESTAMP ×tamp ;
335+ ar &TAG_TRANSMITTED_TIMESTAMP ×tamp_ ;
336336 }
337337 // write channel data
338338 const_cast <sample *>(this )->serialize_channels (ar, archive_version);
@@ -344,10 +344,10 @@ void lsl::sample::serialize(eos::portable_iarchive &ar, const uint32_t archive_v
344344 ar &tag;
345345 if (tag == TAG_DEDUCED_TIMESTAMP) {
346346 // deduce the timestamp
347- timestamp = DEDUCED_TIMESTAMP;
347+ timestamp_ = DEDUCED_TIMESTAMP;
348348 } else {
349349 // read the time stamp
350- ar ×tamp ;
350+ ar ×tamp_ ;
351351 }
352352 // read channel data
353353 serialize_channels (ar, archive_version);
@@ -364,7 +364,7 @@ template <typename T> void test_pattern(T *data, uint32_t num_channels, int offs
364364
365365sample &sample::assign_test_pattern (int offset) {
366366 pushthrough = true ;
367- timestamp = 123456.789 ;
367+ timestamp_ = 123456.789 ;
368368
369369 switch (format_) {
370370 case cft_float32:
@@ -436,7 +436,7 @@ sample_p factory::new_sample(double timestamp, bool pushthrough) {
436436 sample *result = pop_freelist ();
437437 if (!result)
438438 result = new (new char [sample_size_]) sample (fmt_, num_chans_, this );
439- result->timestamp = timestamp;
439+ result->timestamp_ = timestamp;
440440 result->pushthrough = pushthrough;
441441 return sample_p (result);
442442}
0 commit comments