Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
81e346a2
Commit
81e346a2
authored
Aug 16, 2018
by
Ge Jun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a warning in IOBuf::_pref_at()
parent
6ba83745
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
37 deletions
+1
-37
concurrency_limiter.cpp
src/brpc/concurrency_limiter.cpp
+0
-36
iobuf_inl.h
src/butil/iobuf_inl.h
+1
-1
No files found.
src/brpc/concurrency_limiter.cpp
deleted
100644 → 0
View file @
6ba83745
// Copyright (c) 2014 Baidu, Inc.G
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Authors: Lei He (helei@qiyi.com)
#include "brpc/concurrency_limiter.h"
namespace
brpc
{
ConcurrencyLimiter
*
ConcurrencyLimiter
::
CreateConcurrencyLimiterOrDie
(
const
AdaptiveMaxConcurrency
&
max_concurrency
)
{
const
ConcurrencyLimiter
*
cl
=
ConcurrencyLimiterExtension
()
->
Find
(
max_concurrency
.
name
().
c_str
());
CHECK
(
cl
!=
NULL
)
<<
"Fail to find ConcurrencyLimiter by `"
<<
max_concurrency
.
name
()
<<
"'"
;
ConcurrencyLimiter
*
cl_copy
=
cl
->
New
();
CHECK
(
cl_copy
!=
NULL
)
<<
"Fail to new ConcurrencyLimiter"
;
if
(
max_concurrency
==
"constant"
)
{
cl_copy
->
_max_concurrency
=
max_concurrency
;
}
return
cl_copy
;
}
}
// namespace brpc
src/butil/iobuf_inl.h
View file @
81e346a2
...
...
@@ -158,7 +158,7 @@ inline const IOBuf::BlockRef& IOBuf::_ref_at(size_t i) const {
inline
const
IOBuf
::
BlockRef
*
IOBuf
::
_pref_at
(
size_t
i
)
const
{
if
(
_small
())
{
return
i
<
(
!!
_sv
.
refs
[
0
].
block
+
!!
_sv
.
refs
[
1
].
block
)
?
&
_sv
.
refs
[
i
]
:
NULL
;
return
i
<
(
size_t
)(
!!
_sv
.
refs
[
0
].
block
+
!!
_sv
.
refs
[
1
].
block
)
?
&
_sv
.
refs
[
i
]
:
NULL
;
}
else
{
return
i
<
_bv
.
nref
?
&
_bv
.
ref_at
(
i
)
:
NULL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment