/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2016-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
template <typename... ARGS>
[[noreturn]] static void throwDecodeError(Cursor& curs, ARGS&&... args) {
- throw BserDecodeError(folly::to<std::string>(std::forward<ARGS>(args)...,
- " with ",
- curs.length(),
- " bytes remaining in cursor"));
+ throw BserDecodeError(folly::to<std::string>(
+ std::forward<ARGS>(args)...,
+ " with ",
+ curs.length(),
+ " bytes remaining in cursor"));
}
static int64_t decodeInt(Cursor& curs) {
if (available == 0) {
// Saw this case when we decodeHeader was returning the incorrect length
// and we were splitting off too few bytes from the IOBufQueue
- throwDecodeError(curs,
- "no data available while decoding a string, header was "
- "not decoded properly");
+ throwDecodeError(
+ curs,
+ "no data available while decoding a string, header was "
+ "not decoded properly");
}
str.append(reinterpret_cast<const char*>(curs.data()), available);
curs.skipAtMost(available);
folly::dynamic parseBser(StringPiece str) {
return parseBser(ByteRange((uint8_t*)str.data(), str.size()));
}
-}
-}
+} // namespace bser
+} // namespace folly
/* vim:ts=2:sw=2:et:
*/