Put function curlies into their own line according to our coding standards all across the codebase.

This commit is contained in:
László Monda
2017-11-10 23:14:44 +01:00
parent f3682efe53
commit f927aef7f5
7 changed files with 32 additions and 16 deletions

View File

@@ -1,31 +1,37 @@
#include "basic_types.h"
uint8_t readUInt8(config_buffer_t *buffer) {
uint8_t readUInt8(config_buffer_t *buffer)
{
return buffer->buffer[buffer->offset++];
}
uint16_t readUInt16(config_buffer_t *buffer) {
uint16_t readUInt16(config_buffer_t *buffer)
{
uint16_t uInt16 = readUInt8(buffer);
uInt16 |= readUInt8(buffer) << 8;
return uInt16;
}
int16_t readInt16(config_buffer_t *buffer) {
int16_t readInt16(config_buffer_t *buffer)
{
return readUInt16(buffer);
}
bool readBool(config_buffer_t *buffer) {
bool readBool(config_buffer_t *buffer)
{
return readUInt8(buffer);
}
uint16_t readCompactLength(config_buffer_t *buffer) {
uint16_t readCompactLength(config_buffer_t *buffer)
{
uint16_t compactLength = readUInt8(buffer);
return compactLength == 0xFF ? readUInt16(buffer) : compactLength;
}
const char *readString(config_buffer_t *buffer, uint16_t *len) {
const char *readString(config_buffer_t *buffer, uint16_t *len)
{
const char *string;
*len = readCompactLength(buffer);