Commit a4bf98c2 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[STYLE] - while ( fixed.

parent 9be6b08d
......@@ -49,7 +49,7 @@ std::vector< size_t > WHierarchicalTree::findXBiggestClusters( size_t cluster, s
std::list<size_t>worklist;
worklist.push_back( cluster );
while ( worklist.size() < number )
while( worklist.size() < number )
{
size_t current = worklist.front();
worklist.pop_front();
......@@ -70,7 +70,7 @@ std::vector< size_t > WHierarchicalTree::findXBiggestClusters( size_t cluster, s
bool newSplit = true;
while ( newSplit )
while( newSplit )
{
newSplit = false;
size_t current = worklist.front();
......@@ -134,7 +134,7 @@ std::vector< size_t > WHierarchicalTree::downXLevelsFromTop( size_t level, bool
for( size_t i = 0; i < level; ++i )
{
std::list<size_t>newChildList;
while ( !worklist.empty() )
while( !worklist.empty() )
{
size_t current = worklist.front();
worklist.pop_front();
......
......@@ -141,7 +141,7 @@ std::vector<size_t> WHierarchicalTreeFibers::getBestClustersFittingRoi( float ra
std::queue<size_t>worklist;
worklist.push( getClusterCount() - 1 );
while ( !worklist.empty() )
while( !worklist.empty() )
{
size_t current = worklist.front();
worklist.pop();
......
......@@ -115,7 +115,7 @@ std::vector< size_t > WHierarchicalTreeVoxels::findClustersForValue( float value
worklist.push_back( m_clusterCount - 1 );
}
while ( !worklist.empty() )
while( !worklist.empty() )
{
size_t current = worklist.front();
worklist.pop_front();
......@@ -175,7 +175,7 @@ std::vector< size_t >WHierarchicalTreeVoxels::findXClusters( size_t root, size_t
std::list<size_t>worklist;
worklist.push_back( root );
while ( worklist.size() < number )
while( worklist.size() < number )
{
size_t current = worklist.front();
worklist.pop_front();
......
......@@ -123,7 +123,7 @@ struct WSharedLib::data
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, GetLastError(), 0,
reinterpret_cast< LPTSTR >( &lpMsgBuf ), 0, 0 );
LPTSTR p = lpMsgBuf;
while ( *p )
while( *p )
{
msg.push_back( *p++ );
}
......
......@@ -45,7 +45,7 @@ protected:
virtual void threadMain()
{
// Since the modules run in a separate thread: such loops are possible
while ( !m_shutdownFlag() )
while( !m_shutdownFlag() )
{
// do fancy stuff
sleep( 1 );
......
......@@ -242,7 +242,7 @@ void WDataSetFibers::removeColorScheme( WDataSetFibers::ColorArray colors )
WItemSelection::WriteTicket l = m_colors->getWriteTicket();
WItemSelection::Iterator i = l->get().begin();
while ( i != l->get().end() )
while( i != l->get().end() )
{
if( boost::shared_static_cast< const ColorScheme >( *i )->getColor() == colors )
{
......
......@@ -240,7 +240,7 @@ size_t WValueSetHistogram::accumulate( size_t startIndex, size_t endIndex ) cons
// unfortunately, shared_array can't be used for std::accumulate
size_t acc = 0;
while ( startIndex != endIndex )
while( startIndex != endIndex )
{
acc += m_mappedBuckets[ startIndex++ ];
}
......
......@@ -98,7 +98,7 @@ void WGEGroupNode::SafeUpdaterCallback::operator()( osg::Node* node, osg::NodeVi
{
lock = boost::unique_lock<boost::shared_mutex>( rootNode->m_childOperationQueueLock );
// insert/remove children which requested it
while ( !rootNode->m_childOperationQueue.empty() )
while( !rootNode->m_childOperationQueue.empty() )
{
// remove or insert or remove all?
if( rootNode->m_childOperationQueue.front()->m_operation == INSERT )
......
......@@ -215,7 +215,7 @@ void WPickHandler::pick( osgViewer::View* view, const osgGA::GUIEventAdapter& ea
bool ignoreFirst = m_ctrl;
while ( hitr != intersections.end() )
while( hitr != intersections.end() )
{
std::string nodeName = extractSuitableName( hitr );
// now we skip everything that starts with an underscore if not in paint mode
......
......@@ -340,7 +340,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingCubesAlgorithm::g
// Rename vertices.
ID2WPointXYZId::iterator mapIterator = m_idToVertices.begin();
while ( mapIterator != m_idToVertices.end() )
while( mapIterator != m_idToVertices.end() )
{
WPosition texCoord = WPosition( mapIterator->second.x / nbCoordsX,
mapIterator->second.y / nbCoordsY,
......@@ -364,7 +364,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingCubesAlgorithm::g
// Now rename triangles.
WMCTriangleVECTOR::iterator vecIterator = m_trivecTriangles.begin();
while ( vecIterator != m_trivecTriangles.end() )
while( vecIterator != m_trivecTriangles.end() )
{
for( unsigned int i = 0; i < 3; i++ )
{
......
......@@ -383,7 +383,7 @@ boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::genSurfaceOneValue( siz
// Rename vertices.
ID2WMLPointXYZId::iterator mapIterator = m_idToVertices.begin();
while ( mapIterator != m_idToVertices.end() )
while( mapIterator != m_idToVertices.end() )
{
WPosition texCoord = WPosition( mapIterator->second.x / nbCoordsX,
mapIterator->second.y / nbCoordsY,
......@@ -409,7 +409,7 @@ boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::genSurfaceOneValue( siz
// Now rename triangles.
WMLTriangleVECTOR::iterator vecIterator = m_trivecTriangles.begin();
while ( vecIterator != m_trivecTriangles.end() )
while( vecIterator != m_trivecTriangles.end() )
{
for( unsigned int i = 0; i < 3; i++ )
{
......
......@@ -237,7 +237,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::ge
// Rename vertices.
ID2WMLPointXYZId::iterator mapIterator = m_idToVertices.begin();
while ( mapIterator != m_idToVertices.end() )
while( mapIterator != m_idToVertices.end() )
{
WPosition texCoord = WPosition( mapIterator->second.x / nbCoordsX,
mapIterator->second.y / nbCoordsY,
......@@ -263,7 +263,7 @@ template<typename T> boost::shared_ptr<WTriangleMesh> WMarchingLegoAlgorithm::ge
// Now rename triangles.
WMLTriangleVECTOR::iterator vecIterator = m_trivecTriangles.begin();
while ( vecIterator != m_trivecTriangles.end() )
while( vecIterator != m_trivecTriangles.end() )
{
for( unsigned int i = 0; i < 3; i++ )
{
......
......@@ -301,7 +301,7 @@ std::string WGEShader::processShaderRecursive( const std::string filename, bool
std::string line; // the current line
boost::smatch matches; // the list of matches
while ( std::getline( input, line ) )
while( std::getline( input, line ) )
{
if( boost::regex_search( line, matches, includeRegexp ) )
{
......
......@@ -63,7 +63,7 @@ std::string WGEShaderVersionPreprocessor::process( const std::string& file, cons
unsigned int version = 120; // our default version
std::stringstream completeCode( code );
std::ostringstream cleanedCode;
while ( std::getline( completeCode, line ) )
while( std::getline( completeCode, line ) )
{
if( boost::regex_match( line, matches, versionRegexp ) ) // look for the #version statement
{
......
......@@ -135,7 +135,7 @@ void WProjectFile::threadMain()
bool match = false; // true of a parser successfully parsed the line
boost::smatch matches; // the list of matches
while ( std::getline( input, line ) )
while( std::getline( input, line ) )
{
++i; // line number
match = false;
......
......@@ -276,7 +276,7 @@ protected:
virtual void moduleMain()
{
// Since the modules run in a separate thread: such loops are possible
while ( !m_shutdownFlag() )
while( !m_shutdownFlag() )
{
// do fancy stuff
sleep( 1 );
......
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