summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortanjent@gmail.com <tanjent@gmail.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-04-13 23:29:37 +0000
committertanjent@gmail.com <tanjent@gmail.com@77a7d1d3-4c08-bdc2-d393-d5859734b01a>2011-04-13 23:29:37 +0000
commit84de9bd4f5d49fd69a478ec7905a9928e556ac32 (patch)
tree84b483ba1feea58a43d6e0680668cbee2eae7acc
parenta27c28138be78f35f76ea9c13c6354be47097985 (diff)
downloadsrc-84de9bd4f5d49fd69a478ec7905a9928e556ac32.tar.gz
and fix corresponding build breakages under Windows
git-svn-id: http://smhasher.googlecode.com/svn/trunk@134 77a7d1d3-4c08-bdc2-d393-d5859734b01a
-rw-r--r--SpeedTest.cpp6
-rw-r--r--main.cpp1
2 files changed, 3 insertions, 4 deletions
diff --git a/SpeedTest.cpp b/SpeedTest.cpp
index fc71a36..2265389 100644
--- a/SpeedTest.cpp
+++ b/SpeedTest.cpp
@@ -63,11 +63,11 @@ double CalcStdv ( std::vector<double> & v, int a, int b )
// Return true if the largest value in v[0,len) is more than three
// standard deviations from the mean
-bool ContainsOutlier ( std::vector<double> & v, int len )
+bool ContainsOutlier ( std::vector<double> & v, size_t len )
{
double mean = 0;
- for(int i = 0; i < len; i++)
+ for(size_t i = 0; i < len; i++)
{
mean += v[i];
}
@@ -76,7 +76,7 @@ bool ContainsOutlier ( std::vector<double> & v, int len )
double stdv = 0;
- for(int i = 0; i < len; i++)
+ for(size_t i = 0; i < len; i++)
{
double x = v[i] - mean;
stdv += x*x;
diff --git a/main.cpp b/main.cpp
index 03f3e42..eca0848 100644
--- a/main.cpp
+++ b/main.cpp
@@ -7,7 +7,6 @@
#include <stdio.h>
#include <time.h>
-#include <unistd.h>
//-----------------------------------------------------------------------------
// Configuration. TODO - move these to command-line flags