From 00eef6be3c049c67646c43ea25c1f2e96137bd9c Mon Sep 17 00:00:00 2001 From: Giovanna Lazzari Miotto <giovanna.lazzari.miotto@cern.ch> Date: Sat, 9 Dec 2023 17:57:05 +0100 Subject: [PATCH] [lint] Replace deprecated headers Except for header dependency of C source file, all instances of stdint.h are replaced by cstdint. --- src/MicronDmaInputFilter.cc | 3 +-- src/OutputByOrbit.cc | 3 +-- src/OutputByOrbit.h | 2 +- src/OutputBySize.cc | 3 +-- src/OutputBySize.h | 2 +- src/bril_histo.h | 3 ++- src/config.h | 3 +-- src/controls.h | 3 +-- src/format.h | 4 ++-- src/slice.h | 4 ++-- src/tools.h | 2 +- src/wzdma/wz-xdma-ioctl.h | 3 ++- 12 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/MicronDmaInputFilter.cc b/src/MicronDmaInputFilter.cc index 71d2bec1..01d17a28 100644 --- a/src/MicronDmaInputFilter.cc +++ b/src/MicronDmaInputFilter.cc @@ -1,7 +1,6 @@ #include "MicronDmaInputFilter.h" -#include <ctype.h> - +#include <cctype> #include <cstring> #include <system_error> diff --git a/src/OutputByOrbit.cc b/src/OutputByOrbit.cc index 0692f128..e286bf02 100644 --- a/src/OutputByOrbit.cc +++ b/src/OutputByOrbit.cc @@ -1,7 +1,6 @@ #include "OutputByOrbit.h" -#include <stdio.h> - +#include <cstdio> #include <fstream> #include <iostream> #include <string> diff --git a/src/OutputByOrbit.h b/src/OutputByOrbit.h index f08c8d7e..cc50d242 100644 --- a/src/OutputByOrbit.h +++ b/src/OutputByOrbit.h @@ -1,9 +1,9 @@ #ifndef OUTPUTBYORBIT_H #define OUTPUTBYORBIT_H -#include <stdint.h> #include <tbb/pipeline.h> +#include <cstdint> #include <cstdio> #include <string> diff --git a/src/OutputBySize.cc b/src/OutputBySize.cc index 05677b7e..384840b6 100644 --- a/src/OutputBySize.cc +++ b/src/OutputBySize.cc @@ -1,7 +1,6 @@ #include "OutputBySize.h" -#include <stdio.h> - +#include <cstdio> #include <fstream> #include <iostream> #include <string> diff --git a/src/OutputBySize.h b/src/OutputBySize.h index eadfc9ce..c5818334 100644 --- a/src/OutputBySize.h +++ b/src/OutputBySize.h @@ -1,9 +1,9 @@ #ifndef OUTPUTBYSIZE_H #define OUTPUTBYSIZE_H -#include <stdint.h> #include <tbb/pipeline.h> +#include <cstdint> #include <cstdio> #include <string> diff --git a/src/bril_histo.h b/src/bril_histo.h index 7c2aa3a1..cda6dd8d 100644 --- a/src/bril_histo.h +++ b/src/bril_histo.h @@ -1,6 +1,8 @@ #ifndef BRIL_HISTO_H #define BRIL_HISTO_H +#include <tbb/pipeline.h> + #include <atomic> #include <fstream> #include <iostream> @@ -10,7 +12,6 @@ #include <vector> #include "controls.h" -#include <tbb/pipeline.h> template <typename T> class BrilHistoQueue { diff --git a/src/config.h b/src/config.h index f4181d1c..37f55d9d 100644 --- a/src/config.h +++ b/src/config.h @@ -1,9 +1,8 @@ #ifndef CONFIG_H #define CONFIG_H -#include <stdint.h> - #include <boost/lexical_cast.hpp> +#include <cstdint> #include <map> #include <stdexcept> #include <string> diff --git a/src/controls.h b/src/controls.h index 0ecb1556..f3bc5da1 100644 --- a/src/controls.h +++ b/src/controls.h @@ -1,8 +1,7 @@ #ifndef CONTROLS_H #define CONTROLS_H -#include <stdint.h> - #include <atomic> +#include <cstdint> #include <string> struct ctrl { diff --git a/src/format.h b/src/format.h index dd0ccab8..83826773 100644 --- a/src/format.h +++ b/src/format.h @@ -1,8 +1,8 @@ #ifndef FORMAT_H #define FORMAT_H -#include <math.h> -#include <stdint.h> +#include <cmath> +#include <cstdint> struct blockCalo { uint32_t calo0[8]; diff --git a/src/slice.h b/src/slice.h index 5b979ee7..1ab4016c 100644 --- a/src/slice.h +++ b/src/slice.h @@ -1,11 +1,11 @@ #ifndef SLICE_H #define SLICE_H -#include <stdint.h> - #include <tbb/concurrent_queue.h> #include <tbb/scalable_allocator.h> +#include <cstdint> + //! Holds a slice of data. class Slice { //! Pointer to one past last filled byte in sequence diff --git a/src/tools.h b/src/tools.h index db68ba46..a1734cca 100644 --- a/src/tools.h +++ b/src/tools.h @@ -6,10 +6,10 @@ */ #include <curl/curl.h> -#include <limits.h> #include <sys/stat.h> #include <unistd.h> // TODO: This could eventually be replaced by chrono and thread when we move to a more modern C++ compiler. +#include <climits> #include <cstring> #include <iostream> diff --git a/src/wzdma/wz-xdma-ioctl.h b/src/wzdma/wz-xdma-ioctl.h index 60fd5b50..bb4ef248 100644 --- a/src/wzdma/wz-xdma-ioctl.h +++ b/src/wzdma/wz-xdma-ioctl.h @@ -1,10 +1,11 @@ #ifndef WZ_XDMA_IOCTL_H #define WZ_XDMA_IOCTL_H 1 +#include <stdint.h> #include <sys/types.h> #include <unistd.h> + #include "wz-xdma-consts.h" -#include "stdint.h" // Structures used to notify the application about the received block of data // The block always starts at the first descriptor, and may and in the middle -- GitLab