This is an automated email from the ASF dual-hosted git repository.
dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git
The following commit(s) were added to refs/heads/master by this push:
new 8c2b1ca [ISSUE #142] save string::find result into a
string::size_type variable.
8c2b1ca is described below
commit 8c2b1ca71e69e9fe7e4ba441d96f8bab5624d19f
Author: James <[email protected]>
AuthorDate: Fri May 10 10:02:32 2019 +0800
[ISSUE #142] save string::find result into a string::size_type variable.
declare correct string::size_type by auto. (#143)
---
src/common/NameSpaceUtil.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/NameSpaceUtil.cpp b/src/common/NameSpaceUtil.cpp
index 56f1cc4..ff44a00 100644
--- a/src/common/NameSpaceUtil.cpp
+++ b/src/common/NameSpaceUtil.cpp
@@ -28,7 +28,7 @@ bool NameSpaceUtil::isEndPointURL(string nameServerAddr) {
}
string NameSpaceUtil::formatNameServerURL(string nameServerAddr) {
- unsigned int index = nameServerAddr.find(ENDPOINT_PREFIX);
+ auto index = nameServerAddr.find(ENDPOINT_PREFIX);
if (index != string::npos) {
LOG_DEBUG("Get Name Server from endpoint [%s]",
nameServerAddr.substr(ENDPOINT_PREFIX_LENGTH,
nameServerAddr.length() - ENDPOINT_PREFIX_LENGTH).c_str());