Fix returning -1 to an unsigned int return value in getLastRead/WriteIndex
parent
9f536ccb22
commit
fd9d014a82
|
@ -1378,11 +1378,11 @@ SystemTimePoint Monitor::GetTimestamp(int index) const {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int Monitor::GetLastReadIndex() const {
|
int Monitor::GetLastReadIndex() const {
|
||||||
return ( shared_data->last_read_index != image_buffer_count ? shared_data->last_read_index : -1 );
|
return ( shared_data->last_read_index != image_buffer_count ? shared_data->last_read_index : -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int Monitor::GetLastWriteIndex() const {
|
int Monitor::GetLastWriteIndex() const {
|
||||||
return ( shared_data->last_write_index != image_buffer_count ? shared_data->last_write_index : -1 );
|
return ( shared_data->last_write_index != image_buffer_count ? shared_data->last_write_index : -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -840,8 +840,8 @@ class Monitor : public std::enable_shared_from_this<Monitor> {
|
||||||
unsigned int GetCaptureMaxFPS() const { return capture_max_fps; }
|
unsigned int GetCaptureMaxFPS() const { return capture_max_fps; }
|
||||||
Microseconds GetCaptureDelay() const { return capture_delay; }
|
Microseconds GetCaptureDelay() const { return capture_delay; }
|
||||||
Microseconds GetAlarmCaptureDelay() const { return alarm_capture_delay; }
|
Microseconds GetAlarmCaptureDelay() const { return alarm_capture_delay; }
|
||||||
unsigned int GetLastReadIndex() const;
|
int GetLastReadIndex() const;
|
||||||
unsigned int GetLastWriteIndex() const;
|
int GetLastWriteIndex() const;
|
||||||
uint64_t GetLastEventId() const;
|
uint64_t GetLastEventId() const;
|
||||||
double GetFPS() const;
|
double GetFPS() const;
|
||||||
void UpdateFPS();
|
void UpdateFPS();
|
||||||
|
|
Loading…
Reference in New Issue