From 39a5645c387b7a703760e4e0743cdab21ce28a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 10 Feb 2019 01:43:05 +0000 Subject: [PATCH] Explicitely specify underlying type for Capacity enums. --- src/core/partitiontable.h | 5 ++--- src/util/capacity.h | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/partitiontable.h b/src/core/partitiontable.h index a4a0450..51783f8 100644 --- a/src/core/partitiontable.h +++ b/src/core/partitiontable.h @@ -16,8 +16,7 @@ * along with this program. If not, see .* *************************************************************************/ -#if !defined(KPMCORE_PARTITIONTABLE_H) - +#ifndef KPMCORE_PARTITIONTABLE_H #define KPMCORE_PARTITIONTABLE_H #include "util/libpartitionmanagerexport.h" @@ -50,7 +49,7 @@ class LIBKPMCORE_EXPORT PartitionTable : public PartitionNode friend LIBKPMCORE_EXPORT QTextStream& operator<<(QTextStream& stream, const PartitionTable& ptable); public: - enum TableType : qint8 { + enum TableType : int8_t { unknownTableType = -1, aix, diff --git a/src/util/capacity.h b/src/util/capacity.h index 632e847..215d822 100644 --- a/src/util/capacity.h +++ b/src/util/capacity.h @@ -36,11 +36,11 @@ class LIBKPMCORE_EXPORT Capacity { public: /** Units we can deal with */ - enum class Unit : uint { Byte, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB }; + enum class Unit : uint8_t {Byte, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB }; /** Type of capacity to print */ - enum class Type { Used, Available, Total }; + enum class Type : uint8_t { Used, Available, Total }; /** Flags for printing */ - enum class Flag { NoFlags = 0, AppendUnit = 1, AppendBytes = 2 }; + enum class Flag : uint8_t { NoFlags = 0, AppendUnit = 1, AppendBytes = 2 }; Q_DECLARE_FLAGS(Flags, Flag) public: