@@ -1013,7 +1013,7 @@ static void poll_remote_devs(struct node *node, unsigned me)
static void update_programmed_timers(struct node *node)
{
- std::set<struct Timer>::iterator it = programmed_timers.begin();
+ auto it = programmed_timers.begin();
/* Use the current minute because timers do not have second precision. */
time_t current_minute = time(nullptr) / 60;
time_t timer_start_minute = it->start_time / 60;
@@ -845,7 +845,6 @@ static int checkVividControls(struct node *node,
int testExtendedControls(struct node *node)
{
- qctrl_map::iterator iter;
struct v4l2_ext_controls ctrls;
std::vector<struct v4l2_ext_control> total_vec;
std::vector<struct v4l2_ext_control> class_vec;
@@ -92,8 +92,7 @@ void add_fd(int fd_trace, int fd_retrace)
int get_fd_retrace_from_fd_trace(int fd_trace)
{
int fd_retrace = -1;
- std::unordered_map<int, int>::const_iterator it;
- it = ctx_retrace.retrace_fds.find(fd_trace);
+ auto it = ctx_retrace.retrace_fds.find(fd_trace);
if (it != ctx_retrace.retrace_fds.end())
fd_retrace = it->second;
return fd_retrace;
@@ -27,8 +27,7 @@ void add_device(int fd, std::string path)
std::string get_device(int fd)
{
std::string path;
- std::unordered_map<int, std::string>::const_iterator it;
- it = ctx_trace.devices.find(fd);
+ auto it = ctx_trace.devices.find(fd);
if (it != ctx_trace.devices.end())
path = it->second;
return path;
@@ -58,8 +57,7 @@ void set_decode_order(long decode_order)
{
debug_line_info("\n\t%ld", decode_order);
- std::list<long>::iterator it;
- it = find(ctx_trace.decode_order.begin(), ctx_trace.decode_order.end(), decode_order);
+ auto it = find(ctx_trace.decode_order.begin(), ctx_trace.decode_order.end(), decode_order);
if (it == ctx_trace.decode_order.end())
ctx_trace.decode_order.push_front(decode_order);
Found with: modernize-use-auto Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/cec-follower/cec-processing.cpp | 2 +- utils/v4l2-compliance/v4l2-test-controls.cpp | 1 - utils/v4l2-tracer/retrace-helper.cpp | 3 +-- utils/v4l2-tracer/trace-helper.cpp | 6 ++---- 4 files changed, 4 insertions(+), 8 deletions(-)