fix code style

1. add .clang-format code style file.
2. format code of core.

use `clang-format -i -style=file ./core/*/*.cc ./core/*/*.h` command to format
This commit is contained in:
wb-hx510875
2020-07-01 16:06:18 +08:00
committed by page
parent e065d50def
commit a57f6ec422
39 changed files with 7959 additions and 8262 deletions

View File

@@ -1,38 +1,34 @@
/*
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* 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.
*/
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* 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.
*/
#include <alibabacloud/core/Url.h>
#include <sstream>
#include <memory>
#include "EcsMetadataFetcher.h"
#include "CurlHttpClient.h"
#include <alibabacloud/core/Url.h>
#include <memory>
#include <sstream>
namespace AlibabaCloud {
EcsMetadataFetcher::EcsMetadataFetcher() {
}
EcsMetadataFetcher::EcsMetadataFetcher() {}
EcsMetadataFetcher::~EcsMetadataFetcher() {
}
EcsMetadataFetcher::~EcsMetadataFetcher() {}
std::string EcsMetadataFetcher::roleName()const {
return roleName_;
}
std::string EcsMetadataFetcher::roleName() const { return roleName_; }
void EcsMetadataFetcher::setRoleName(const std::string & roleName) {
void EcsMetadataFetcher::setRoleName(const std::string &roleName) {
roleName_ = roleName;
}
@@ -41,7 +37,7 @@ std::string EcsMetadataFetcher::getMetadata() {
}
std::string EcsMetadataFetcher::getMetadata(const std::string host,
const std::string in_path) {
const std::string in_path) {
std::stringstream path;
path << in_path << roleName_;
@@ -61,4 +57,4 @@ std::string EcsMetadataFetcher::getMetadata(const std::string host,
return outcome.error().errorCode();
}
} // namespace AlibabaCloud
} // namespace AlibabaCloud