mirror of https://github.com/ByConity/ByConity
More strict aliasing
This commit is contained in:
parent
3bf1e6f6c1
commit
5cf3414b8a
|
@ -487,7 +487,7 @@ private:
|
|||
detail::QuantileTimingLarge * large;
|
||||
};
|
||||
|
||||
enum class Kind : UInt8
|
||||
enum class Kind : uint8_t
|
||||
{
|
||||
Tiny = 1,
|
||||
Medium = 2,
|
||||
|
|
|
@ -12,11 +12,11 @@ namespace DB
|
|||
namespace details
|
||||
{
|
||||
|
||||
enum class ContainerType : UInt8 { SMALL = 1, MEDIUM = 2, LARGE = 3 };
|
||||
enum class ContainerType : uint8_t { SMALL = 1, MEDIUM = 2, LARGE = 3 };
|
||||
|
||||
static inline ContainerType max(const ContainerType & lhs, const ContainerType & rhs)
|
||||
{
|
||||
UInt8 res = std::max(static_cast<UInt8>(lhs), static_cast<UInt8>(rhs));
|
||||
uint8_t res = std::max(static_cast<uint8_t>(lhs), static_cast<uint8_t>(rhs));
|
||||
return static_cast<ContainerType>(res);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,20 +20,20 @@ class ReadBuffer;
|
|||
class ClientInfo
|
||||
{
|
||||
public:
|
||||
enum class Interface : UInt8
|
||||
enum class Interface : uint8_t
|
||||
{
|
||||
TCP = 1,
|
||||
HTTP = 2,
|
||||
};
|
||||
|
||||
enum class HTTPMethod : UInt8
|
||||
enum class HTTPMethod : uint8_t
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
GET = 1,
|
||||
POST = 2,
|
||||
};
|
||||
|
||||
enum class QueryKind : UInt8
|
||||
enum class QueryKind : uint8_t
|
||||
{
|
||||
NO_QUERY = 0, /// Uninitialized object.
|
||||
INITIAL_QUERY = 1,
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace DB
|
|||
/// A struct which will be inserted as row into query_log table
|
||||
struct QueryLogElement
|
||||
{
|
||||
enum Type : UInt8 // Make it signed for compatibility with DataTypeEnum8
|
||||
enum Type : int8_t // Make it signed for compatibility with DataTypeEnum8
|
||||
{
|
||||
QUERY_START = 1,
|
||||
QUERY_FINISH = 2,
|
||||
|
|
|
@ -15,7 +15,7 @@ struct ASTTablesInSelectQueryElement;
|
|||
class ASTSelectQuery : public IAST
|
||||
{
|
||||
public:
|
||||
enum class Expression : UInt8
|
||||
enum class Expression : uint8_t
|
||||
{
|
||||
WITH,
|
||||
SELECT,
|
||||
|
|
Loading…
Reference in New Issue