Skip to content

Commit 770c2b8

Browse files
committed
[C++] Formatting.
1 parent 6673853 commit 770c2b8

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

sbe-tool/src/main/cpp/otf/IrDecoder.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343

4444
using namespace sbe::otf;
4545

46-
namespace sbe {
47-
namespace otf {
46+
namespace sbe { namespace otf {
4847

4948
class IrDecoder
5049
{
@@ -158,7 +157,7 @@ class IrDecoder
158157
int fd = fileno(fptr);
159158
while (remaining > 0)
160159
{
161-
long sz = ::read(fd, buffer + (length - remaining), (4098 < remaining) ? 4098 : remaining);
160+
long sz = ::read(fd, buffer + (length - remaining), 4098 < remaining ? 4098 : remaining);
162161
remaining -= sz;
163162
if (sz < 0)
164163
{
@@ -168,7 +167,7 @@ class IrDecoder
168167

169168
fclose(fptr);
170169

171-
return (remaining == 0) ? 0 : -1;
170+
return remaining == 0 ? 0 : -1;
172171
}
173172

174173
private:
@@ -272,8 +271,7 @@ class IrDecoder
272271
type, presence, byteOrder, minValue, maxValue, nullValue, constValue,
273272
characterEncoding, epoch, timeUnit, semanticType);
274273

275-
Token token(
276-
tokenOffset, id, version, tokenSize, componentTokenCount, signal, name, description, encoding);
274+
Token token(tokenOffset, id, version, tokenSize, componentTokenCount, signal, name, description, encoding);
277275

278276
tokens->push_back(token);
279277

sbe-tool/src/main/cpp/otf/OtfMessageDecoder.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323

2424
using namespace sbe::otf;
2525

26-
namespace sbe {
27-
namespace otf {
28-
namespace OtfMessageDecoder {
26+
namespace sbe { namespace otf { namespace OtfMessageDecoder {
2927

3028
typedef std::function<void(Token& token)> on_begin_message_t;
3129

@@ -279,7 +277,6 @@ std::size_t decodeData(
279277
throw std::runtime_error("length too short for data length field");
280278
}
281279

282-
// TODO: is length always unsigned according to spec?
283280
std::uint64_t dataLength = isPresent ?
284281
lengthToken.encoding().getAsUInt(buffer + bufferIndex + lengthToken.offset()) : 0;
285282

sbe-tool/src/main/cpp/otf/Token.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
#include "Encoding.h"
2323

24-
namespace sbe {
25-
namespace otf {
24+
namespace sbe { namespace otf {
2625

2726
/// Constants used for holding Token signals
2827
enum class Signal : int
@@ -78,8 +77,7 @@ class Token
7877
Signal signal,
7978
std::string name,
8079
std::string description,
81-
Encoding encoding)
82-
:
80+
Encoding encoding) :
8381
m_offset(offset),
8482
m_fieldId(fieldId),
8583
m_version(version),

0 commit comments

Comments
 (0)