mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 23:22:25 +01:00
byuu says: Basically just a project rename, with s/bsnes/higan and the new icon from lowkee added in. It won't compile on Windows because I forgot to update the resource.rc file, and a path transform command isn't working on Windows. It was really just meant as a starting point, so that v091 WIPs can flow starting from .00 with the new name (it overshadows bsnes v091, so publicly speaking this "shouldn't exist" and will probably be deleted from Google Code when v092 is ready.)
29 lines
1.1 KiB
C++
Executable File
29 lines
1.1 KiB
C++
Executable File
#ifndef NALL_UDL_HPP
|
|
#define NALL_UDL_HPP
|
|
|
|
//user-defined literals
|
|
|
|
#include <nall/atoi.hpp>
|
|
#include <type_traits>
|
|
|
|
namespace nall {
|
|
constexpr inline uintmax_t operator"" _b(const char *n) { return binary(n); }
|
|
|
|
//convert to bytes
|
|
constexpr inline uintmax_t operator"" _kb(unsigned long long n) { return 1024 * n; }
|
|
constexpr inline uintmax_t operator"" _mb(unsigned long long n) { return 1024 * 1024 * n; }
|
|
constexpr inline uintmax_t operator"" _gb(unsigned long long n) { return 1024 * 1024 * 1024 * n; }
|
|
|
|
//convert to bits
|
|
constexpr inline uintmax_t operator"" _kbit(unsigned long long n) { return 1024 * n / 8; }
|
|
constexpr inline uintmax_t operator"" _mbit(unsigned long long n) { return 1024 * 1024 * n / 8; }
|
|
constexpr inline uintmax_t operator"" _gbit(unsigned long long n) { return 1024 * 1024 * 1024 * n / 8; }
|
|
|
|
//convert to hz
|
|
constexpr inline uintmax_t operator"" _khz(long double n) { return n * 1000; }
|
|
constexpr inline uintmax_t operator"" _mhz(long double n) { return n * 1000000; }
|
|
constexpr inline uintmax_t operator"" _ghz(long double n) { return n * 1000000000; }
|
|
}
|
|
|
|
#endif
|