summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/ArmCPUDetect.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-03-03 19:56:36 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-03-03 19:56:36 -0600
commitfcf87f6c53fd26b4dcbba5151185f3c4f4d4bd1d (patch)
tree08fd3277db552867f251bed449400f68387ac6f6 /Source/Core/Common/Src/ArmCPUDetect.cpp
parentcedfa452b4497590f828306b42b1e7c24915fd58 (diff)
parent814c2ffdfd213dfa78078471d298e2657b7e14e9 (diff)
Merge branch 'windows-unicode'
Fixed unicode filename handling on Windows. Made all significant projects build with "Unicode" option on Windows. Fixed unicode string handling in GUI code on all OSes. From now on: std::string == UTF-8. Fixed issue 4111. Fixed issue 5178. Fixed issue 5980.
Diffstat (limited to 'Source/Core/Common/Src/ArmCPUDetect.cpp')
-rw-r--r--Source/Core/Common/Src/ArmCPUDetect.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/Common/Src/ArmCPUDetect.cpp b/Source/Core/Common/Src/ArmCPUDetect.cpp
index c03ab08c48..8b5cbf9b79 100644
--- a/Source/Core/Common/Src/ArmCPUDetect.cpp
+++ b/Source/Core/Common/Src/ArmCPUDetect.cpp
@@ -18,6 +18,7 @@
#include "Common.h"
#include "CPUDetect.h"
#include "StringUtil.h"
+#include "FileUtil.h"
const char procfile[] = "/proc/cpuinfo";
@@ -27,9 +28,9 @@ char *GetCPUString()
char *cpu_string = 0;
// Count the number of processor lines in /proc/cpuinfo
char buf[1024];
- FILE *fp;
- fp = fopen(procfile, "r");
+ File::IOFile file(procfile, "r");
+ auto const fp = file.GetHandle();
if (!fp)
return 0;
@@ -47,9 +48,9 @@ bool CheckCPUFeature(const char *feature)
{
const char marker[] = "Features\t: ";
char buf[1024];
- FILE *fp;
-
- fp = fopen(procfile, "r");
+
+ File::IOFile file(procfile, "r");
+ auto const fp = file.GetHandle();
if (!fp)
return 0;
@@ -73,9 +74,9 @@ int GetCoreCount()
const char marker[] = "processor\t: ";
int cores = 0;
char buf[1024];
- FILE *fp;
-
- fp = fopen(procfile, "r");
+
+ File::IOFile file(procfile, "r");
+ auto const fp = file.GetHandle();
if (!fp)
return 0;