From 1123999d93eeeb76fb88212c0fc2ba7a61f880a4 Mon Sep 17 00:00:00 2001 From: David Williams Date: Thu, 26 Aug 2010 22:04:09 +0000 Subject: [PATCH] Removed 'using namespace' decalarations in inl's. --- library/PolyVoxCore/include/SurfaceExtractor.inl | 4 ++-- library/PolyVoxUtil/include/Serialization.inl | 10 ++++------ library/PolyVoxUtil/include/VolumeChangeTracker.inl | 2 -- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/library/PolyVoxCore/include/SurfaceExtractor.inl b/library/PolyVoxCore/include/SurfaceExtractor.inl index 24024324..983cf0bf 100644 --- a/library/PolyVoxCore/include/SurfaceExtractor.inl +++ b/library/PolyVoxCore/include/SurfaceExtractor.inl @@ -27,8 +27,6 @@ freely, subject to the following restrictions: #include "PolyVoxImpl/MarchingCubesTables.h" #include "SurfaceVertex.h" -using namespace std; - namespace PolyVox { template @@ -41,6 +39,8 @@ namespace PolyVox m_regSizeInVoxels.cropTo(m_volData->getEnclosingRegion()); m_regSizeInCells = m_regSizeInVoxels; m_regSizeInCells.setUpperCorner(m_regSizeInCells.getUpperCorner() - Vector3DInt16(1,1,1)); + + m_meshCurrent->clear(); } template diff --git a/library/PolyVoxUtil/include/Serialization.inl b/library/PolyVoxUtil/include/Serialization.inl index 835635a5..ef09bce6 100644 --- a/library/PolyVoxUtil/include/Serialization.inl +++ b/library/PolyVoxUtil/include/Serialization.inl @@ -25,14 +25,12 @@ freely, subject to the following restrictions: #include "VolumeSampler.h" #include "PolyVoxImpl/Utility.h" -using namespace std; - namespace PolyVox { //Note: we don't do much error handling in here - exceptions will simply be propergated up to the caller. //FIXME - think about pointer ownership issues. Or could return volume by value if the copy constructor is shallow template - shared_ptr< Volume > loadVolumeRaw(istream& stream, VolumeSerializationProgressListener* progressListener) + std::shared_ptr< Volume > loadVolumeRaw(std::istream& stream, VolumeSerializationProgressListener* progressListener) { //Read volume dimensions uint8_t volumeWidthPower = 0; @@ -47,7 +45,7 @@ namespace PolyVox uint16_t volumeDepth = 0x0001 << volumeDepthPower; //FIXME - need to support non cubic volumes - shared_ptr< Volume > volume(new Volume(volumeWidth, volumeHeight, volumeDepth)); + std::shared_ptr< Volume > volume(new Volume(volumeWidth, volumeHeight, volumeDepth)); //Read data for(uint16_t z = 0; z < volumeDepth; ++z) @@ -128,7 +126,7 @@ namespace PolyVox //Note: we don't do much error handling in here - exceptions will simply be propergated up to the caller. //FIXME - think about pointer ownership issues. Or could return volume by value if the copy constructor is shallow template - shared_ptr< Volume > loadVolumeRle(istream& stream, VolumeSerializationProgressListener* progressListener) + std::shared_ptr< Volume > loadVolumeRle(std::istream& stream, VolumeSerializationProgressListener* progressListener) { //Read volume dimensions uint8_t volumeWidthPower = 0; @@ -143,7 +141,7 @@ namespace PolyVox uint16_t volumeDepth = 0x0001 << volumeDepthPower; //FIXME - need to support non cubic volumes - shared_ptr< Volume > volume(new Volume(volumeWidth, volumeHeight, volumeDepth)); + std::shared_ptr< Volume > volume(new Volume(volumeWidth, volumeHeight, volumeDepth)); //Read data bool firstTime = true; diff --git a/library/PolyVoxUtil/include/VolumeChangeTracker.inl b/library/PolyVoxUtil/include/VolumeChangeTracker.inl index 69b031c7..1a71ce73 100644 --- a/library/PolyVoxUtil/include/VolumeChangeTracker.inl +++ b/library/PolyVoxUtil/include/VolumeChangeTracker.inl @@ -34,8 +34,6 @@ freely, subject to the following restrictions: #include "Volume.h" #include "VolumeSampler.h" -using namespace std; - namespace PolyVox { template