Fix build with STLPort from NDK r8d

This commit is contained in:
Andrey Kamaev
2012-12-21 19:58:51 +04:00
parent ffdbddd6b1
commit 9944282b09
18 changed files with 47 additions and 33 deletions

View File

@@ -1453,7 +1453,7 @@ void VocData::readClassifierGroundTruth(const string& filename, vector<string>&
string line;
string image;
int obj_present;
int obj_present = 0;
while (!gtfile.eof())
{
std::getline(gtfile,line);
@@ -1826,7 +1826,7 @@ void VocData::readFileToString(const string filename, string& file_contents)
int VocData::stringToInteger(const string input_str)
{
int result;
int result = 0;
stringstream ss(input_str);
if ((ss >> result).fail())

View File

@@ -2,6 +2,8 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <cctype>
#include <stdio.h>
#include <string.h>
#include <time.h>

View File

@@ -1,7 +1,9 @@
#include <cctype>
#include <cstring>
#include <cmath>
#include <iostream>
#include <sstream>
#include "opencv2/core/core.hpp"
#include "opencv2/core/opengl_interop.hpp"
#include "opencv2/highgui/highgui.hpp"

View File

@@ -45,11 +45,11 @@ int main( int argc, char* argv[])
return -1;
}
int divideWith; // convert our input string to number - C++ style
int divideWith = 0; // convert our input string to number - C++ style
stringstream s;
s << argv[2];
s >> divideWith;
if (!s)
if (!s || !divideWith)
{
cout << "Invalid number entered for dividing. " << endl;
return -1;

View File

@@ -32,7 +32,7 @@ public:
ifstream f(path.c_str());
if (!f.is_open())
throw runtime_error("can't open motions file: " + path);
int size; f >> size;
int size = 0; f >> size;
motions_.resize(size);
for (int i = 0; i < size; ++i)
{