@@ -148,7 +148,7 @@ struct node {
bool verbose;
-typedef std::vector<cec_msg> msg_vec;
+using msg_vec = std::vector<cec_msg>;
static struct option long_options[] = {
{ "device", required_argument, nullptr, OptSetDevice },
@@ -118,10 +118,10 @@ std::string mi_media_get_device(__u32 major, __u32 minor)
return "";
}
-typedef struct {
+struct flag_def {
unsigned flag;
const char *str;
-} flag_def;
+};
static std::string flags2s(unsigned val, const flag_def *def)
{
@@ -16,10 +16,10 @@ static std::string num2s(unsigned num, bool is_hex = true)
return buf;
}
-typedef struct {
+struct flag_def {
unsigned flag;
const char *str;
-} flag_def;
+};
static std::string flags2s(unsigned val, const flag_def *def)
{
@@ -51,10 +51,10 @@ class VbiTab;
class QCloseEvent;
class CaptureWin;
-typedef std::vector<unsigned> ClassIDVec;
-typedef std::map<unsigned, ClassIDVec> ClassMap;
-typedef std::map<unsigned, struct v4l2_query_ext_ctrl> CtrlMap;
-typedef std::map<unsigned, QWidget *> WidgetMap;
+using ClassIDVec = std::vector<unsigned>;
+using ClassMap = std::map<unsigned, ClassIDVec>;
+using CtrlMap = std::map<unsigned, v4l2_query_ext_ctrl>;
+using WidgetMap = std::map<unsigned, QWidget *>;
enum {
CTRL_UPDATE_ON_CHANGE = 0x10,
@@ -29,7 +29,7 @@
#define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
-typedef std::vector<std::string> dev_vec;
+using dev_vec = std::vector<std::string>;
using dev_map = std::map<std::string, std::string>;
/* Short option list
@@ -78,10 +78,10 @@ struct test_query_ext_ctrl: v4l2_query_ext_ctrl {
__u64 menu_mask;
};
-typedef std::map<__u32, struct test_query_ext_ctrl> qctrl_map;
-typedef std::map<__u32, __u32> pixfmt_map;
-typedef std::set<__u64> frmsizes_set;
-typedef std::map<__u32, unsigned> frmsizes_count_map;
+using qctrl_map = std::map<__u32, test_query_ext_ctrl>;
+using pixfmt_map = std::map<__u32, __u32>;
+using frmsizes_set = std::set<__u64>;
+using frmsizes_count_map = std::map<__u32, unsigned>;
struct base_node;
@@ -93,7 +93,7 @@ enum QueryBufMode {
Dequeued
};
-typedef std::map<struct timeval, struct v4l2_buffer> buf_info_map;
+using buf_info_map = std::map<struct timeval, struct v4l2_buffer>;
static buf_info_map buffer_info;
#define FILE_HDR_ID v4l2_fourcc('V', 'h', 'd', 'r')
@@ -73,7 +73,7 @@ static int checkDevice(__u32 major, __u32 minor, bool iface, __u32 id)
return 0;
}
-typedef std::set<__u32> id_set;
+using id_set = std::set<__u32>;
static media_v2_topology topology;
static media_v2_entity *v2_ents;
@@ -22,7 +22,7 @@ struct ctrl_subset {
unsigned size[V4L2_CTRL_MAX_DIMS];
};
-typedef std::map<unsigned, std::vector<struct v4l2_ext_control> > class2ctrls_map;
+using class2ctrls_map = std::map<unsigned int, std::vector<struct v4l2_ext_control> >;
using ctrl_qmap = std::map<std::string, struct v4l2_query_ext_ctrl>;
static ctrl_qmap ctrl_str2q;
@@ -277,10 +277,10 @@ extern __u32 vidcap_buftype;
extern __u32 vidout_buftype;
extern int verbose;
-typedef struct {
+struct flag_def {
unsigned flag;
const char *str;
-} flag_def;
+};
/* fmts specified */
#define FmtWidth (1L<<0)
Found with modernize-use-using Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/cec-ctl/cec-ctl.cpp | 2 +- utils/common/media-info.cpp | 4 ++-- utils/common/v4l2-info.cpp | 4 ++-- utils/qv4l2/qv4l2.h | 8 ++++---- utils/rds-ctl/rds-ctl.cpp | 2 +- utils/v4l2-compliance/v4l2-compliance.h | 8 ++++---- utils/v4l2-compliance/v4l2-test-buffers.cpp | 2 +- utils/v4l2-compliance/v4l2-test-media.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-common.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl.h | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-)