mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:20:05 +00:00 
			
		
		
		
	Fix GLEW clang-tidy issues
This commit is contained in:
		
							parent
							
								
									331b2d855f
								
							
						
					
					
						commit
						a6f8547455
					
				
					 15 changed files with 176 additions and 95 deletions
				
			
		|  | @ -140,6 +140,10 @@ void Icons::Initialize() | |||
|    glBindBuffer(GL_ARRAY_BUFFER, p->vbo_[0]); | ||||
|    glBufferData(GL_ARRAY_BUFFER, 0u, nullptr, GL_DYNAMIC_DRAW); | ||||
| 
 | ||||
|    // NOLINTBEGIN(modernize-use-nullptr)
 | ||||
|    // NOLINTBEGIN(performance-no-int-to-ptr)
 | ||||
|    // NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers)
 | ||||
| 
 | ||||
|    // aVertex
 | ||||
|    glVertexAttribPointer(0, | ||||
|                          2, | ||||
|  | @ -197,6 +201,10 @@ void Icons::Initialize() | |||
|                          static_cast<void*>(0)); | ||||
|    glEnableVertexAttribArray(2); | ||||
| 
 | ||||
|    // NOLINTEND(cppcoreguidelines-avoid-magic-numbers)
 | ||||
|    // NOLINTEND(performance-no-int-to-ptr)
 | ||||
|    // NOLINTEND(modernize-use-nullptr)
 | ||||
| 
 | ||||
|    p->dirty_ = true; | ||||
| } | ||||
| 
 | ||||
|  | @ -689,10 +697,11 @@ void Icons::Impl::Update(bool textureAtlasChanged) | |||
| 
 | ||||
|       // Buffer texture data
 | ||||
|       glBindBuffer(GL_ARRAY_BUFFER, vbo_[1]); | ||||
|       glBufferData(GL_ARRAY_BUFFER, | ||||
|                    sizeof(float) * textureBuffer_.size(), | ||||
|                    textureBuffer_.data(), | ||||
|                    GL_DYNAMIC_DRAW); | ||||
|       glBufferData( | ||||
|          GL_ARRAY_BUFFER, | ||||
|          static_cast<GLsizeiptr>(sizeof(float) * textureBuffer_.size()), | ||||
|          textureBuffer_.data(), | ||||
|          GL_DYNAMIC_DRAW); | ||||
| 
 | ||||
|       lastTextureAtlasChanged_ = false; | ||||
|    } | ||||
|  | @ -702,10 +711,11 @@ void Icons::Impl::Update(bool textureAtlasChanged) | |||
|    { | ||||
|       // Buffer vertex data
 | ||||
|       glBindBuffer(GL_ARRAY_BUFFER, vbo_[0]); | ||||
|       glBufferData(GL_ARRAY_BUFFER, | ||||
|                    sizeof(float) * currentIconBuffer_.size(), | ||||
|                    currentIconBuffer_.data(), | ||||
|                    GL_DYNAMIC_DRAW); | ||||
|       glBufferData( | ||||
|          GL_ARRAY_BUFFER, | ||||
|          static_cast<GLsizeiptr>(sizeof(float) * currentIconBuffer_.size()), | ||||
|          currentIconBuffer_.data(), | ||||
|          GL_DYNAMIC_DRAW); | ||||
| 
 | ||||
|       numVertices_ = | ||||
|          static_cast<GLsizei>(currentIconBuffer_.size() / kPointsPerVertex); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat