Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
32d0dbbbf8
commit
da7bead8c6
@ -5,7 +5,7 @@
|
|||||||
// Filter.cpp
|
// Filter.cpp
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Copyright (c) 2003 OpenBeOS Project
|
// Copyright (c) 2003-2005 Haiku Project
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
extern "C" int _kget_cpu_state_(int cpu);
|
extern "C" int _kget_cpu_state_(int cpu);
|
||||||
|
|
||||||
|
|
||||||
// Implementation of FilterThread
|
// Implementation of FilterThread
|
||||||
FilterThread::FilterThread(Filter* filter, int32 i, int32 n, bool runInCurrentThread)
|
FilterThread::FilterThread(Filter* filter, int32 i, int32 n, bool runInCurrentThread)
|
||||||
: fFilter(filter)
|
: fFilter(filter)
|
||||||
@ -250,16 +251,15 @@ Filter::NumberOfActiveCPUs() const
|
|||||||
system_info info;
|
system_info info;
|
||||||
get_system_info(&info);
|
get_system_info(&info);
|
||||||
count = info.cpu_count;
|
count = info.cpu_count;
|
||||||
int32 CPUCount = 0;
|
int32 cpuCount = 0;
|
||||||
for (int i = 0; i < count; i ++) {
|
for (int i = 0; i < count; i ++) {
|
||||||
if (_kget_cpu_state_(i)) {
|
if (_kget_cpu_state_(i))
|
||||||
CPUCount ++;
|
cpuCount++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (CPUCount == 0) {
|
if (cpuCount == 0)
|
||||||
CPUCount = 1;
|
cpuCount = 1;
|
||||||
}
|
|
||||||
return CPUCount;
|
return cpuCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation of (bilinear) Scaler
|
// Implementation of (bilinear) Scaler
|
||||||
|
Loading…
Reference in New Issue
Block a user