mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Replace typedefs in C++ with using declarations (#1339)
These are more readable than typedefs. C headers were left alone.
This commit is contained in:
committed by
Peter Johnson
parent
26c33a9a56
commit
8b1274d744
@@ -29,7 +29,7 @@ class Frame {
|
||||
friend class SourceImpl;
|
||||
|
||||
public:
|
||||
typedef uint64_t Time;
|
||||
using Time = uint64_t;
|
||||
|
||||
private:
|
||||
struct Impl {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace {
|
||||
template <typename T>
|
||||
class UidVector {
|
||||
public:
|
||||
typedef typename std::vector<T>::size_type size_type;
|
||||
using size_type = typename std::vector<T>::size_type;
|
||||
|
||||
size_type size() const { return m_vector.size(); }
|
||||
T& operator[](size_type i) { return m_vector[i]; }
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace cs {
|
||||
// convert value initialization into default initialization.
|
||||
template <typename T, typename A = std::allocator<T>>
|
||||
class default_init_allocator : public A {
|
||||
typedef std::allocator_traits<A> a_t;
|
||||
using a_t = std::allocator_traits<A>;
|
||||
|
||||
public:
|
||||
template <typename U>
|
||||
|
||||
@@ -371,9 +371,8 @@ double GetTelemetryAverageValue(CS_Handle handle, CS_TelemetryKind kind,
|
||||
* @defgroup cscore_logging_func Logging Functions
|
||||
* @{
|
||||
*/
|
||||
typedef std::function<void(unsigned int level, const char* file,
|
||||
unsigned int line, const char* msg)>
|
||||
LogFunc;
|
||||
using LogFunc = std::function<void(unsigned int level, const char* file,
|
||||
unsigned int line, const char* msg)>;
|
||||
void SetLogger(LogFunc func, unsigned int min_level);
|
||||
void SetDefaultLogger(unsigned int min_level);
|
||||
/** @} */
|
||||
|
||||
Reference in New Issue
Block a user