mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
cpplint: disallow if one-liners
This commit is contained in:
1 parent
7063c59b97
commit
2bc30f239b
22 files changed
+340
-168
No files matched your search
+4
-2
@@ -471,7 +471,8 @@ void ReadFloatGeneric(const FunctionCallbackInfo<Value>& args) {
|
||||
const void* data = args.This()->GetIndexedPropertiesExternalArrayData();
|
||||
const char* ptr = static_cast<const char*>(data) + offset;
|
||||
memcpy(na.bytes, ptr, sizeof(na.bytes));
|
||||
if (endianness != GetEndianness()) Swizzle(na.bytes, sizeof(na.bytes));
|
||||
if (endianness != GetEndianness())
|
||||
Swizzle(na.bytes, sizeof(na.bytes));
|
||||
|
||||
args.GetReturnValue().Set(na.val);
|
||||
}
|
||||
@@ -525,7 +526,8 @@ uint32_t WriteFloatGeneric(const FunctionCallbackInfo<Value>& args) {
|
||||
union NoAlias na = { val };
|
||||
void* data = args.This()->GetIndexedPropertiesExternalArrayData();
|
||||
char* ptr = static_cast<char*>(data) + offset;
|
||||
if (endianness != GetEndianness()) Swizzle(na.bytes, sizeof(na.bytes));
|
||||
if (endianness != GetEndianness())
|
||||
Swizzle(na.bytes, sizeof(na.bytes));
|
||||
memcpy(ptr, na.bytes, sizeof(na.bytes));
|
||||
return offset + sizeof(na.bytes);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user