From 82c34361550ab0c388446df89e698d591d27bb62 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 1 Nov 2020 17:14:44 -0500 Subject: [PATCH] cppcheck improvements. Remove non-const StartTime and EndTime. We will remove the dirty hack use in zm_monitor. --- src/zm_event.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/zm_event.h b/src/zm_event.h index ff709e5c6..ab837658e 100644 --- a/src/zm_event.h +++ b/src/zm_event.h @@ -119,17 +119,15 @@ class Event { const struct timeval &StartTime() const { return start_time; } const struct timeval &EndTime() const { return end_time; } - struct timeval &StartTime() const { return start_time; } - struct timeval &EndTime() const { return end_time; } bool SendFrameImage( const Image *image, bool alarm_frame=false ); - bool WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame=false ); + bool WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame=false ) const; bool WriteFrameVideo( const Image *image, const struct timeval timestamp, VideoWriter* videow ); void updateNotes( const StringSetMap &stringSetMap ); void AddFrames( int n_frames, Image **images, struct timeval **timestamps ); - void AddFrame( Image *image, struct timeval timestamp, int score=0, Image *alarm_frame=nullptr ); + void AddFrame( Image *image, struct timeval timestamp, int score=0, Image *alarm_image=nullptr ); private: void AddFramesInternal( int n_frames, int start_frame, Image **images, struct timeval **timestamps );