mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-24 05:25:21 +00:00
Updated Coding Style (markdown)
parent
8f185f7a1a
commit
0421b787e0
1 changed files with 3 additions and 1 deletions
|
@ -23,4 +23,6 @@ We recommend to follow these guidelines when writing code for RPCS3. They aren't
|
|||
* Pointers to the datatype `T` are `mem_ptr_t<T>`.
|
||||
* Pointers to the function `T (*)(t1 a1, t2 a2)` are `mem_func_ptr_t<T (*)(t1 a1, t2 a2)>`
|
||||
* Allocate memory with *MemoryAllocator*.
|
||||
* Don't forget to switch endianness: That is, allocate `u32` with `MemoryAllocator<be_t<u32>>`
|
||||
* Don't forget to switch endianness: That is, allocate `u32` with `MemoryAllocator<be_t<u32>>`
|
||||
* Switch endianness on compile time if possible:
|
||||
* When comparing the type `be_t<u32> x` with the constant `y`, use: `x.ToBE()` and `se32(y)` respectively to gain speed by switching the endianness of the constant in compilation time.
|
Loading…
Add table
Reference in a new issue