Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: gpu/command_buffer/service/id_manager.cc

Issue 3743001: FBTF: Fix more ctor/dtors found by clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Rebase to pick up mac fix on ToT Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/id_manager.h ('k') | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/id_manager.h" 5 #include "gpu/command_buffer/service/id_manager.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 7
8 namespace gpu { 8 namespace gpu {
9 namespace gles2 { 9 namespace gles2 {
10 10
11 IdManager::IdManager() {}
12
13 IdManager::~IdManager() {}
14
11 bool IdManager::AddMapping(GLuint client_id, GLuint service_id) { 15 bool IdManager::AddMapping(GLuint client_id, GLuint service_id) {
12 std::pair<MapType::iterator, bool> result = id_map_.insert( 16 std::pair<MapType::iterator, bool> result = id_map_.insert(
13 std::make_pair(client_id, service_id)); 17 std::make_pair(client_id, service_id));
14 return result.second; 18 return result.second;
15 } 19 }
16 20
17 bool IdManager::RemoveMapping(GLuint client_id, GLuint service_id) { 21 bool IdManager::RemoveMapping(GLuint client_id, GLuint service_id) {
18 MapType::iterator iter = id_map_.find(client_id); 22 MapType::iterator iter = id_map_.find(client_id);
19 if (iter != id_map_.end() && iter->second == service_id) { 23 if (iter != id_map_.end() && iter->second == service_id) {
20 id_map_.erase(iter); 24 id_map_.erase(iter);
(...skipping 23 matching lines...) Expand all
44 return true; 48 return true;
45 } 49 }
46 } 50 }
47 return false; 51 return false;
48 } 52 }
49 53
50 } // namespace gles2 54 } // namespace gles2
51 } // namespace gpu 55 } // namespace gpu
52 56
53 57
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/id_manager.h ('k') | gpu/command_buffer/service/program_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698