Skip to content

Commit 667bfcf

Browse files
committed
[core] IndexedGeometry remove debug print.
1 parent 864fd92 commit 667bfcf

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

src/Core/Geometry/IndexedGeometry.cpp

+4-27
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#include <Core/Geometry/IndexedGeometry.hpp>
22

3-
#include <Core/Utils/TypesUtils.hpp>
4-
53
#include <iterator>
64

75
namespace Ra {
@@ -10,29 +8,19 @@ namespace Geometry {
108

119
MultiIndexedGeometry::MultiIndexedGeometry( const MultiIndexedGeometry& other ) :
1210
AttribArrayGeometry( other ) {
13-
std::cerr << "MultiIndexedGeometry & other\n";
1411
deepCopy( other );
1512
}
1613

1714
MultiIndexedGeometry::MultiIndexedGeometry( MultiIndexedGeometry&& other ) :
18-
AttribArrayGeometry( std::move( other ) ), m_indices( std::move( other.m_indices ) ) {
19-
20-
std::cerr << "MultiIndexedGeometry && other\n";
21-
}
15+
AttribArrayGeometry( std::move( other ) ), m_indices( std::move( other.m_indices ) ) {}
2216

2317
MultiIndexedGeometry::MultiIndexedGeometry( const AttribArrayGeometry& other ) :
24-
AttribArrayGeometry( other ) {
25-
std::cerr << "MultiIndexedGeometry & other\n";
26-
}
18+
AttribArrayGeometry( other ) {}
2719

2820
MultiIndexedGeometry::MultiIndexedGeometry( AttribArrayGeometry&& other ) :
29-
AttribArrayGeometry( std::move( other ) ) {
30-
std::cerr << "MultiIndexedGeometry Atrib && other\n";
31-
}
21+
AttribArrayGeometry( std::move( other ) ) {}
3222

3323
MultiIndexedGeometry& MultiIndexedGeometry::operator=( const MultiIndexedGeometry& other ) {
34-
std::cerr << "MultiIndexedGeometry = & other\n";
35-
3624
invalidateAabb();
3725
AttribArrayGeometry::operator=( other );
3826
deepCopy( other );
@@ -41,8 +29,6 @@ MultiIndexedGeometry& MultiIndexedGeometry::operator=( const MultiIndexedGeometr
4129
}
4230

4331
MultiIndexedGeometry& MultiIndexedGeometry::operator=( MultiIndexedGeometry&& other ) {
44-
std::cerr << "MultiIndexedGeometry = && other\n";
45-
4632
invalidateAabb();
4733
AttribArrayGeometry::operator=( std::move( other ) );
4834
m_indices = std::move( other.m_indices );
@@ -140,12 +126,8 @@ size_t MultiIndexedGeometry::countLayers( const LayerSemanticCollection& semanti
140126
std::pair<MultiIndexedGeometry::LayerKeyType, const GeometryIndexLayerBase&>
141127
MultiIndexedGeometry::getFirstLayerOccurrence( const LayerSemantic& semanticName ) const {
142128
for ( const auto& [key, value] : m_indices ) {
143-
if ( key.first.find( semanticName ) != key.first.end() ) {
144-
145-
auto& tmp = *( value.second.get() );
146-
std::cerr << "get typeinfo " << Utils::demangleType( tmp ) << "\n";
129+
if ( key.first.find( semanticName ) != key.first.end() )
147130
return { key, *( value.second.get() ) };
148-
}
149131
}
150132
throw std::out_of_range( "Layer entry not found" );
151133
}
@@ -233,9 +215,6 @@ std::pair<bool, GeometryIndexLayerBase&>
233215
MultiIndexedGeometry::addLayer( std::unique_ptr<GeometryIndexLayerBase>&& layer,
234216
const bool withLock,
235217
const std::string& layerName ) {
236-
237-
auto& tmp1 = *( layer.get() );
238-
std::cerr << "add layer typeinfo " << Utils::demangleType( tmp1 ) << "\n";
239218
LayerKeyType key { layer->semantics(), layerName };
240219
auto elt = std::make_pair( key, std::make_pair( false, std::move( layer ) ) );
241220
auto [pos, inserted] = m_indices.insert( std::move( elt ) );
@@ -247,8 +226,6 @@ MultiIndexedGeometry::addLayer( std::unique_ptr<GeometryIndexLayerBase>&& layer,
247226
}
248227
/// If not inserted, the pointer is deleted. So the caller must ensure this possible
249228
/// deletion is safe before calling this method.
250-
auto& tmp = *( pos->second.second.get() );
251-
std::cerr << "add layer inserted typeinfo " << Utils::demangleType( tmp ) << "\n";
252229

253230
return { inserted, *( pos->second.second ) };
254231
}

src/Core/Geometry/IndexedGeometry.hpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <Core/Utils/ObjectWithSemantic.hpp>
99
#include <Core/Utils/StdMapIterators.hpp>
1010

11-
#include <cstdint>
1211
#include <unordered_map>
1312

1413
namespace Ra {
@@ -454,12 +453,8 @@ class RA_CORE_API MultiIndexedGeometry : public AttribArrayGeometry, public Util
454453

455454
/// \brief Index layer for a point cloud
456455
struct RA_CORE_API PointCloudIndexLayer : public GeometryIndexLayer<Vector1ui> {
457-
using base = GeometryIndexLayer<Vector1ui>;
458456
/// \brief Constructor of an empty layer
459457
inline PointCloudIndexLayer();
460-
inline PointCloudIndexLayer( const PointCloudIndexLayer& other ) = default;
461-
inline PointCloudIndexLayer& operator=( const PointCloudIndexLayer& other ) = default;
462-
inline PointCloudIndexLayer& operator=( PointCloudIndexLayer&& other ) = default;
463458

464459
/// \brief Constructor of an index layer with linearly spaced indices ranging from \f$0\f$ to
465460
/// \f$n-1\f$
@@ -564,6 +559,7 @@ struct getType<Vector1ui> {
564559

565560
/**
566561
* \brief A single layer MultiIndexedGeometry.
562+
*
567563
* This class actually provide compatibility with old geometry with a main layer.
568564
* Main layer contains indices of a specific type (point, line, triangle, poly).
569565
* Derived classes explicit the kind of indices of the main layer.

src/Core/Geometry/IndexedGeometry.inl

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ inline const void* GeometryIndexLayer<T>::dataPtr() const {
9292

9393
template <typename T>
9494
inline std::unique_ptr<GeometryIndexLayerBase> GeometryIndexLayer<T>::clone() {
95-
std::cerr << " clone GeometryIndexLayer \n";
9695
auto copy = std::make_unique<GeometryIndexLayer<T>>( *this );
9796
copy->m_collection = m_collection;
9897
return copy;

0 commit comments

Comments
 (0)