mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 05:54:20 +01:00
Update code style
Limit source code to 80 chars, and declare functions return type and modifiers on a separate line. This allows to avoid very long lines, and all function names are aligned. (We do this on VLC, and I like it.)
This commit is contained in:
@@ -3,23 +3,27 @@
|
||||
|
||||
#include <SDL2/SDL_stdinc.h>
|
||||
|
||||
static inline void buffer_write16be(Uint8 *buf, Uint16 value) {
|
||||
static inline void
|
||||
buffer_write16be(Uint8 *buf, Uint16 value) {
|
||||
buf[0] = value >> 8;
|
||||
buf[1] = value;
|
||||
}
|
||||
|
||||
static inline void buffer_write32be(Uint8 *buf, Uint32 value) {
|
||||
static inline void
|
||||
buffer_write32be(Uint8 *buf, Uint32 value) {
|
||||
buf[0] = value >> 24;
|
||||
buf[1] = value >> 16;
|
||||
buf[2] = value >> 8;
|
||||
buf[3] = value;
|
||||
}
|
||||
|
||||
static inline Uint32 buffer_read32be(Uint8 *buf) {
|
||||
static inline Uint32
|
||||
buffer_read32be(Uint8 *buf) {
|
||||
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
|
||||
}
|
||||
|
||||
static inline Uint64 buffer_read64be(Uint8 *buf) {
|
||||
static inline
|
||||
Uint64 buffer_read64be(Uint8 *buf) {
|
||||
Uint32 msb = buffer_read32be(buf);
|
||||
Uint32 lsb = buffer_read32be(&buf[4]);
|
||||
return ((Uint64) msb << 32) | lsb;
|
||||
|
||||
Reference in New Issue
Block a user