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

Unified Diff: source/cpu_id.cc

Issue 1418253002: switch cpu flags to 0 for unitialized to avoid compare (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: bump chromium to lkgr Created 5 years, 2 months 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 | « include/libyuv/version.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/cpu_id.cc
diff --git a/source/cpu_id.cc b/source/cpu_id.cc
index 381d40f161b51287f78778fd8353f15b4eabd2e3..9465df6562c92466cda77ee84db2228ac8892175 100644
--- a/source/cpu_id.cc
+++ b/source/cpu_id.cc
@@ -174,7 +174,7 @@ static int MipsCpuCaps(const char* search_string) {
// CPU detect function for SIMD instruction sets.
LIBYUV_API
-int cpu_info_ = kCpuInit; // cpu_info is not initialized yet.
+int cpu_info_ = 0; // cpu_info is not initialized yet.
// Test environment variable for disabling CPU features. Any non-zero value
// to disable. Zero ignored to make it easy to set the variable on/off.
@@ -291,8 +291,9 @@ int InitCpuFlags(void) {
if (TestEnv("LIBYUV_DISABLE_ASM")) {
cpu_info = 0;
}
+ cpu_info |= kCpuInitialized;
cpu_info_ = cpu_info;
- return cpu_info_;
+ return cpu_info;
}
// Note that use of this function is not thread safe.
« no previous file with comments | « include/libyuv/version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698