From f8351aef302fa2da6183096fdf0013b2f29900ae Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Fri, 14 Aug 2020 23:35:47 +0200 Subject: upgrade to C++17 --- Makefile | 2 +- ssh-agent-filter.C | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9c6a8a4..6fbf4e1 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ CXXFLAGS ?= -g -O2 -Wall -Wold-style-cast CPPFLAGS += -D_FILE_OFFSET_BITS=64 -CXXFLAGS += -std=c++11 +CXXFLAGS += -std=c++17 LDLIBS = -lstdc++ -lboost_program_options -lboost_filesystem -lboost_system -lboost_iostreams -lnettle -lpthread all: ssh-agent-filter.1 afssh.1 ssh-askpass-noinput.1 diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index b6d906b..340c606 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -499,8 +499,7 @@ rfc4251::string handle_request (rfc4251::string const & r) { if (allowed_pubkeys.count(key)) allow = true; else { - auto it = confirmed_pubkeys.find(key); - if (it != confirmed_pubkeys.end()) { + if (auto it = confirmed_pubkeys.find(key); it != confirmed_pubkeys.end()) { string request_description; bool dissect_ok{false}; if (!dissect_ok) -- cgit v1.2.3