mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
[CI] clang-tidy auto fixes (#1352)
Fixes #1351. Please review and commit clang-tidy fixes. Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com> Co-authored-by: Sergey Kuznetsov <skuznetsov@ripple.com>
This commit is contained in:
committed by
GitHub
parent
25876aef9b
commit
3fa1df9117
@@ -97,7 +97,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param val The value that is deprecated
|
* @param val The value that is deprecated
|
||||||
*/
|
*/
|
||||||
Deprecated(T val) : value_(val)
|
Deprecated(T val) : value_(std::move(val))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "rpc/common/Modifiers.hpp"
|
#include "rpc/common/Modifiers.hpp"
|
||||||
#include "rpc/common/Specs.hpp"
|
#include "rpc/common/Specs.hpp"
|
||||||
#include "rpc/common/Types.hpp"
|
#include "rpc/common/Types.hpp"
|
||||||
|
#include "rpc/common/ValidationHelpers.hpp"
|
||||||
#include "rpc/common/Validators.hpp"
|
#include "rpc/common/Validators.hpp"
|
||||||
#include "util/Fixtures.hpp"
|
#include "util/Fixtures.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ TEST_F(DeprecatedTests, Field)
|
|||||||
|
|
||||||
TEST_F(DeprecatedTests, FieldWithStringValue)
|
TEST_F(DeprecatedTests, FieldWithStringValue)
|
||||||
{
|
{
|
||||||
Deprecated<std::string> checker{"some_value"};
|
Deprecated<std::string> const checker{"some_value"};
|
||||||
auto warning = checker.check(json, "some_string");
|
auto warning = checker.check(json, "some_string");
|
||||||
ASSERT_TRUE(warning);
|
ASSERT_TRUE(warning);
|
||||||
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
||||||
@@ -59,7 +59,7 @@ TEST_F(DeprecatedTests, FieldWithStringValue)
|
|||||||
|
|
||||||
TEST_F(DeprecatedTests, FieldWithIntValue)
|
TEST_F(DeprecatedTests, FieldWithIntValue)
|
||||||
{
|
{
|
||||||
Deprecated<int> checker{42};
|
Deprecated<int> const checker{42};
|
||||||
auto warning = checker.check(json, "some_number");
|
auto warning = checker.check(json, "some_number");
|
||||||
ASSERT_TRUE(warning);
|
ASSERT_TRUE(warning);
|
||||||
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
||||||
@@ -69,7 +69,7 @@ TEST_F(DeprecatedTests, FieldWithIntValue)
|
|||||||
|
|
||||||
TEST_F(DeprecatedTests, FieldWithBoolValue)
|
TEST_F(DeprecatedTests, FieldWithBoolValue)
|
||||||
{
|
{
|
||||||
Deprecated<bool> checker{false};
|
Deprecated<bool> const checker{false};
|
||||||
auto warning = checker.check(json, "some_bool");
|
auto warning = checker.check(json, "some_bool");
|
||||||
ASSERT_TRUE(warning);
|
ASSERT_TRUE(warning);
|
||||||
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
||||||
@@ -79,7 +79,7 @@ TEST_F(DeprecatedTests, FieldWithBoolValue)
|
|||||||
|
|
||||||
TEST_F(DeprecatedTests, FieldWithFloatValue)
|
TEST_F(DeprecatedTests, FieldWithFloatValue)
|
||||||
{
|
{
|
||||||
Deprecated<float> checker{3.14};
|
Deprecated<float> const checker{3.14};
|
||||||
auto warning = checker.check(json, "some_float");
|
auto warning = checker.check(json, "some_float");
|
||||||
ASSERT_TRUE(warning);
|
ASSERT_TRUE(warning);
|
||||||
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
EXPECT_EQ(warning->warningCode, WarningCode::warnRPC_DEPRECATED);
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
|
|
||||||
using namespace rpc;
|
using namespace rpc;
|
||||||
|
|
||||||
using testing::Return;
|
|
||||||
using testing::StrictMock;
|
using testing::StrictMock;
|
||||||
|
|
||||||
struct SpecsTests : testing::Test {
|
struct SpecsTests : testing::Test {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "rpc/Errors.hpp"
|
#include "rpc/Errors.hpp"
|
||||||
#include "rpc/JS.hpp"
|
#include "rpc/JS.hpp"
|
||||||
#include "rpc/common/AnyHandler.hpp"
|
#include "rpc/common/AnyHandler.hpp"
|
||||||
|
#include "rpc/common/Specs.hpp"
|
||||||
#include "rpc/common/Types.hpp"
|
#include "rpc/common/Types.hpp"
|
||||||
#include "rpc/handlers/Ledger.hpp"
|
#include "rpc/handlers/Ledger.hpp"
|
||||||
#include "util/Fixtures.hpp"
|
#include "util/Fixtures.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user