// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Network module" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include #include namespace Nz { template std::enable_if_t::value, T> HostToNet(T value) { #ifdef NAZARA_LITTLE_ENDIAN return SwapBytes(value); #else return value; #endif } template std::enable_if_t::value, T> NetToHost(T value) { #ifdef NAZARA_LITTLE_ENDIAN return SwapBytes(value); #else return value; #endif } } #include