Reformat wv core/src files
[ Merge of http://go/wvgerrit/80484 ] Clang-format has been run on files in core/src. clang-format has been turned off for some blocks but otherwise no other changes have been made. Bug: 134365840 Test: WV unit/integration tests Change-Id: I6e509f25136f84d37de3d920084302f0f2c23dc4
This commit is contained in:
@@ -11,14 +11,16 @@ namespace wvcdm {
|
||||
|
||||
bool BufferReader::Read1(uint8_t* v) {
|
||||
if (v == NULL) {
|
||||
LOGE("BufferReader::Read1 : Failure during parse: Null output parameter "
|
||||
"when expecting non-null");
|
||||
LOGE(
|
||||
"BufferReader::Read1 : Failure during parse: Null output parameter "
|
||||
"when expecting non-null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasBytes(1)) {
|
||||
LOGV("BufferReader::Read1 : Failure while parsing: "
|
||||
"Not enough bytes (1)");
|
||||
LOGV(
|
||||
"BufferReader::Read1 : Failure while parsing: "
|
||||
"Not enough bytes (1)");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,14 +32,18 @@ bool BufferReader::Read1(uint8_t* v) {
|
||||
template <typename T>
|
||||
bool BufferReader::Read(T* v) {
|
||||
if (v == NULL) {
|
||||
LOGE("BufferReader::Read<T> : Failure during parse: Null output parameter "
|
||||
"when expecting non-null (%s)", __PRETTY_FUNCTION__);
|
||||
LOGE(
|
||||
"BufferReader::Read<T> : Failure during parse: Null output parameter "
|
||||
"when expecting non-null (%s)",
|
||||
__PRETTY_FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasBytes(sizeof(T))) {
|
||||
LOGV("BufferReader::Read<T> : Failure during parse: "
|
||||
"Not enough bytes (%u)", sizeof(T));
|
||||
LOGV(
|
||||
"BufferReader::Read<T> : Failure during parse: "
|
||||
"Not enough bytes (%u)",
|
||||
sizeof(T));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,14 +65,17 @@ bool BufferReader::Read8s(int64_t* v) { return Read(v); }
|
||||
|
||||
bool BufferReader::ReadString(std::string* str, size_t count) {
|
||||
if (str == NULL) {
|
||||
LOGE("BufferReader::ReadString : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
LOGE(
|
||||
"BufferReader::ReadString : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasBytes(count)) {
|
||||
LOGV("BufferReader::ReadString : Parse Failure: "
|
||||
"Not enough bytes (%d)", count);
|
||||
LOGV(
|
||||
"BufferReader::ReadString : Parse Failure: "
|
||||
"Not enough bytes (%d)",
|
||||
count);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,14 +86,17 @@ bool BufferReader::ReadString(std::string* str, size_t count) {
|
||||
|
||||
bool BufferReader::ReadVec(std::vector<uint8_t>* vec, size_t count) {
|
||||
if (vec == NULL) {
|
||||
LOGE("BufferReader::ReadVec : Failure during parse: Null output parameter "
|
||||
"when expecting non-null");
|
||||
LOGE(
|
||||
"BufferReader::ReadVec : Failure during parse: Null output parameter "
|
||||
"when expecting non-null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!HasBytes(count)) {
|
||||
LOGV("BufferReader::ReadVec : Parse Failure: "
|
||||
"Not enough bytes (%d)", count);
|
||||
LOGV(
|
||||
"BufferReader::ReadVec : Parse Failure: "
|
||||
"Not enough bytes (%d)",
|
||||
count);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -96,8 +108,10 @@ bool BufferReader::ReadVec(std::vector<uint8_t>* vec, size_t count) {
|
||||
|
||||
bool BufferReader::SkipBytes(size_t bytes) {
|
||||
if (!HasBytes(bytes)) {
|
||||
LOGV("BufferReader::SkipBytes : Parse Failure: "
|
||||
"Not enough bytes (%d)", bytes);
|
||||
LOGV(
|
||||
"BufferReader::SkipBytes : Parse Failure: "
|
||||
"Not enough bytes (%d)",
|
||||
bytes);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -107,8 +121,9 @@ bool BufferReader::SkipBytes(size_t bytes) {
|
||||
|
||||
bool BufferReader::Read4Into8(uint64_t* v) {
|
||||
if (v == NULL) {
|
||||
LOGE("BufferReader::Read4Into8 : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
LOGE(
|
||||
"BufferReader::Read4Into8 : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,8 +137,9 @@ bool BufferReader::Read4Into8(uint64_t* v) {
|
||||
|
||||
bool BufferReader::Read4sInto8s(int64_t* v) {
|
||||
if (v == NULL) {
|
||||
LOGE("BufferReader::Read4sInto8s : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
LOGE(
|
||||
"BufferReader::Read4sInto8s : Failure during parse: Null output "
|
||||
"parameter when expecting non-null");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user