mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	Attempt to shut up CoverityScan warnings about tainted values
This commit is contained in:
		
							parent
							
								
									b210e99abc
								
							
						
					
					
						commit
						b21dc17538
					
				
					 1 changed files with 2 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -527,9 +527,7 @@ void Water::createSimpleWaterStateSet(osg::Node* node, float alpha)
 | 
			
		|||
 | 
			
		||||
    // Add animated textures
 | 
			
		||||
    std::vector<osg::ref_ptr<osg::Texture2D> > textures;
 | 
			
		||||
    int frameCount = Fallback::Map::getInt("Water_SurfaceFrameCount");
 | 
			
		||||
    frameCount = std::min(std::max(frameCount, 0), 320);
 | 
			
		||||
 | 
			
		||||
    int frameCount = std::max(0, std::min(Fallback::Map::getInt("Water_SurfaceFrameCount"), 320));
 | 
			
		||||
    const std::string& texture = Fallback::Map::getString("Water_SurfaceTexture");
 | 
			
		||||
    for (int i=0; i<frameCount; ++i)
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			@ -645,9 +643,7 @@ Water::~Water()
 | 
			
		|||
 | 
			
		||||
void Water::listAssetsToPreload(std::vector<std::string> &textures)
 | 
			
		||||
{
 | 
			
		||||
    int frameCount = Fallback::Map::getInt("Water_SurfaceFrameCount");
 | 
			
		||||
    frameCount = std::min(std::max(frameCount, 0), 320);
 | 
			
		||||
 | 
			
		||||
    int frameCount = std::max(0, std::min(Fallback::Map::getInt("Water_SurfaceFrameCount"), 320));
 | 
			
		||||
    const std::string& texture = Fallback::Map::getString("Water_SurfaceTexture");
 | 
			
		||||
    for (int i=0; i<frameCount; ++i)
 | 
			
		||||
    {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue