Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: runtime/platform/utils.cc

Issue 2470663006: Add .clang-format and run clang-format on runtime/platform. (Closed)
Patch Set: Remove default override for short functions Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/platform/utils_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/utils.cc
diff --git a/runtime/platform/utils.cc b/runtime/platform/utils.cc
index 77783909495bac054683b8c50375059db699856b..0dde3c702713eee0fb8c6f92dadd07c425146878 100644
--- a/runtime/platform/utils.cc
+++ b/runtime/platform/utils.cc
@@ -39,11 +39,26 @@ int Utils::HighestBit(int64_t v) {
uint64_t x = static_cast<uint64_t>((v > 0) ? v : -v);
uint64_t t;
int r = 0;
- if ((t = x >> 32) != 0) { x = t; r += 32; }
- if ((t = x >> 16) != 0) { x = t; r += 16; }
- if ((t = x >> 8) != 0) { x = t; r += 8; }
- if ((t = x >> 4) != 0) { x = t; r += 4; }
- if ((t = x >> 2) != 0) { x = t; r += 2; }
+ if ((t = x >> 32) != 0) {
+ x = t;
+ r += 32;
+ }
+ if ((t = x >> 16) != 0) {
+ x = t;
+ r += 16;
+ }
+ if ((t = x >> 8) != 0) {
+ x = t;
+ r += 8;
+ }
+ if ((t = x >> 4) != 0) {
+ x = t;
+ r += 4;
+ }
+ if ((t = x >> 2) != 0) {
+ x = t;
+ r += 2;
+ }
if (x > 1) r += 1;
return r;
}
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/platform/utils_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698