Skip to content

Commit 8c2b1ca

Browse files
ifplusorShannonDing
authored andcommitted
[ISSUE #142] save string::find result into a string::size_type variable.
declare correct string::size_type by auto. (#143)
1 parent c1f4254 commit 8c2b1ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/NameSpaceUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bool NameSpaceUtil::isEndPointURL(string nameServerAddr) {
2828
}
2929

3030
string NameSpaceUtil::formatNameServerURL(string nameServerAddr) {
31-
unsigned int index = nameServerAddr.find(ENDPOINT_PREFIX);
31+
auto index = nameServerAddr.find(ENDPOINT_PREFIX);
3232
if (index != string::npos) {
3333
LOG_DEBUG("Get Name Server from endpoint [%s]",
3434
nameServerAddr.substr(ENDPOINT_PREFIX_LENGTH, nameServerAddr.length() - ENDPOINT_PREFIX_LENGTH).c_str());

0 commit comments

Comments
 (0)