Commit 42e8c89e authored by Jan Möbius's avatar Jan Möbius

Fixed clang build error in ACG tests and several clang warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20003 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a34fd594
......@@ -79,8 +79,8 @@ class Point {
};
template<class OSTREAM>
OSTREAM &operator<< (OSTREAM &stream, const Point &point) {
return stream << "(" << point.x << ", " << point.y << ", " << point.weight << ", " << "'" << point.classifier << "'" << ")";
OSTREAM &operator<< (OSTREAM &stream, Point* point) {
return stream << "(" << point->x << ", " << point->y << ", " << point->weight << ", " << "'" << point->classifier << "'" << ")";
}
template<class OUTPUT_ITERATOR>
......@@ -109,15 +109,15 @@ testing::AssertionResult checkClusterConsistency(const std::vector<Point> &point
cluster_2_classifier[*cluster_it] = point_it->classifier;
if (point_it->classifier == '.' && *cluster_it != 0) {
return testing::AssertionFailure() << "Noise point " << *point_it << " was mapped to non-noise cluster " << *cluster_it << ".";
return testing::AssertionFailure() << "Noise point " << &(*point_it) << " was mapped to non-noise cluster " << *cluster_it << ".";
}
if (*cluster_it == 0 && point_it->classifier != '.') {
return testing::AssertionFailure() << "Non-noise point " << *point_it << " was mapped to noise cluster (0).";
return testing::AssertionFailure() << "Non-noise point " << &(*point_it) << " was mapped to noise cluster (0).";
}
} else {
if (map_it->second != point_it->classifier) {
return testing::AssertionFailure() << "Point " << *point_it << " was mapped to cluster '" << map_it->second << "'.";
return testing::AssertionFailure() << "Point " << &(*point_it) << " was mapped to cluster '" << map_it->second << "'.";
}
}
}
......
......@@ -2202,7 +2202,7 @@ typename PolyLineT<PointT>::CustomPropertyHandle PolyLineT<PointT>::
}
template <class PointT>
const std::string& PolyLineT<PointT>::
const std::string PolyLineT<PointT>::
get_custom_property_name(CustomPropertyHandle _property_handle) const {
CustomProperty* p = custom_prop(_property_handle);
......@@ -2211,7 +2211,8 @@ const std::string& PolyLineT<PointT>::
return p->name;
std::cerr << "PolyLineT::get_custom_property_name - invalid handle" << std::endl;
return 0;
return "";
}
......
......@@ -533,7 +533,7 @@ public:
CustomPropertyHandle get_custom_property_handle(const std::string& _name) const;
// get name of property by handle
const std::string& get_custom_property_name(CustomPropertyHandle _property_handle) const;
const std::string get_custom_property_name(CustomPropertyHandle _property_handle) const;
// get number of custom properties
unsigned int get_num_custom_properties() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment