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

Side by Side Diff: mojo/edk/system/channel_endpoint_id.cc

Issue 1770493002: Remove MOJO_STATIC_CONST_MEMBER_DEFINITION. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | mojo/edk/system/message_in_transit.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/edk/system/channel_endpoint_id.h" 5 #include "mojo/edk/system/channel_endpoint_id.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 namespace system { 8 namespace system {
9 9
10 MOJO_STATIC_CONST_MEMBER_DEFINITION const uint32_t 10 const uint32_t ChannelEndpointId::kRemoteFlag;
11 ChannelEndpointId::kRemoteFlag;
12 11
13 ChannelEndpointId LocalChannelEndpointIdGenerator::GetNext() { 12 ChannelEndpointId LocalChannelEndpointIdGenerator::GetNext() {
14 ChannelEndpointId rv = next_; 13 ChannelEndpointId rv = next_;
15 next_.value_ = (next_.value_ + 1) & ~ChannelEndpointId::kRemoteFlag; 14 next_.value_ = (next_.value_ + 1) & ~ChannelEndpointId::kRemoteFlag;
16 // Skip over the invalid value, in case we wrap. 15 // Skip over the invalid value, in case we wrap.
17 if (!next_.is_valid()) 16 if (!next_.is_valid())
18 next_.value_++; 17 next_.value_++;
19 return rv; 18 return rv;
20 } 19 }
21 20
22 ChannelEndpointId RemoteChannelEndpointIdGenerator::GetNext() { 21 ChannelEndpointId RemoteChannelEndpointIdGenerator::GetNext() {
23 ChannelEndpointId rv = next_; 22 ChannelEndpointId rv = next_;
24 next_.value_ = (next_.value_ + 1) | ChannelEndpointId::kRemoteFlag; 23 next_.value_ = (next_.value_ + 1) | ChannelEndpointId::kRemoteFlag;
25 return rv; 24 return rv;
26 } 25 }
27 26
28 } // namespace system 27 } // namespace system
29 } // namespace mojo 28 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/message_in_transit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698