mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-19 01:15:08 -04:00
Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas. * spl: extend to use virtual keyslots
This commit is contained in:
parent
3a1ccdd919
commit
81f91803ec
118 changed files with 13301 additions and 405 deletions
|
@ -208,4 +208,11 @@ namespace ams::util {
|
|||
return T(1) << (BITSIZEOF(T) - CountLeadingZeros(x) - 1);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr ALWAYS_INLINE T DivideUp(T v, U d) {
|
||||
using Unsigned = typename std::make_unsigned<U>::type;
|
||||
const Unsigned add = static_cast<Unsigned>(d) - 1;
|
||||
return static_cast<T>((v + add) / d);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue