mirror of
https://github.com/XRPLF/rippled.git
synced 2026-10-19 18:18:12 +00:00
Compare commits
1 Commits
develop
...
mvadari/pe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44616773e7 |
@@ -42,9 +42,9 @@ public:
|
||||
|
||||
STArray&
|
||||
operator=(STArray const&) = default;
|
||||
STArray(STArray&&);
|
||||
STArray(STArray&&) noexcept;
|
||||
STArray&
|
||||
operator=(STArray&&);
|
||||
operator=(STArray&&) noexcept;
|
||||
|
||||
STArray(SField const& f, std::size_t n);
|
||||
STArray(SerialIter& sit, SField const& f, int depth = 0);
|
||||
|
||||
@@ -85,9 +85,9 @@ public:
|
||||
|
||||
STObject&
|
||||
operator=(STObject const&) = default;
|
||||
STObject(STObject&&);
|
||||
STObject(STObject&&) noexcept;
|
||||
STObject&
|
||||
operator=(STObject&& other);
|
||||
operator=(STObject&& other) noexcept;
|
||||
|
||||
STObject(SOTemplate const& type, SField const& name);
|
||||
STObject(
|
||||
|
||||
@@ -45,11 +45,11 @@ private:
|
||||
public:
|
||||
~STVar();
|
||||
STVar(STVar const& other);
|
||||
STVar(STVar&& other);
|
||||
STVar(STVar&& other) noexcept;
|
||||
STVar&
|
||||
operator=(STVar const& rhs);
|
||||
STVar&
|
||||
operator=(STVar&& rhs);
|
||||
operator=(STVar&& rhs) noexcept;
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
|
||||
STVar(STBase&& t) : p_(t.move(kMaxSize, &d_))
|
||||
|
||||
@@ -11,16 +11,20 @@
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
STArray::STArray(STArray&& other) : STBase(other.getFName()), v_(std::move(other.v_))
|
||||
// Lets std::vector move, not copy, elements when it grows.
|
||||
static_assert(std::is_nothrow_move_constructible_v<STArray>);
|
||||
|
||||
STArray::STArray(STArray&& other) noexcept : STBase(other.getFName()), v_(std::move(other.v_))
|
||||
{
|
||||
}
|
||||
|
||||
STArray&
|
||||
STArray::operator=(STArray&& other)
|
||||
STArray::operator=(STArray&& other) noexcept
|
||||
{
|
||||
setFName(other.getFName());
|
||||
v_ = std::move(other.v_);
|
||||
|
||||
@@ -37,12 +37,16 @@
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
STObject::STObject(STObject&& other)
|
||||
// Lets std::vector move, not copy, elements when it grows.
|
||||
static_assert(std::is_nothrow_move_constructible_v<STObject>);
|
||||
|
||||
STObject::STObject(STObject&& other) noexcept
|
||||
: STBase(other.getFName()), v_(std::move(other.v_)), type_(other.type_)
|
||||
{
|
||||
}
|
||||
@@ -126,7 +130,7 @@ STObject::add(Serializer& s) const
|
||||
}
|
||||
|
||||
STObject&
|
||||
STObject::operator=(STObject&& other)
|
||||
STObject::operator=(STObject&& other) noexcept
|
||||
{
|
||||
setFName(other.getFName());
|
||||
type_ = other.type_;
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
|
||||
namespace xrpl::detail {
|
||||
|
||||
// Lets std::vector move, not copy, elements when it grows.
|
||||
static_assert(std::is_nothrow_move_constructible_v<STVar>);
|
||||
|
||||
DefaultObjectT gDefaultObject;
|
||||
NonPresentObjectT gNonPresentObject;
|
||||
|
||||
@@ -41,7 +44,7 @@ STVar::STVar(STVar const& other)
|
||||
p_ = other.p_->copy(kMaxSize, &d_);
|
||||
}
|
||||
|
||||
STVar::STVar(STVar&& other)
|
||||
STVar::STVar(STVar&& other) noexcept
|
||||
{
|
||||
if (other.onHeap())
|
||||
{
|
||||
@@ -74,7 +77,7 @@ STVar::operator=(STVar const& rhs)
|
||||
}
|
||||
|
||||
STVar&
|
||||
STVar::operator=(STVar&& rhs)
|
||||
STVar::operator=(STVar&& rhs) noexcept
|
||||
{
|
||||
if (&rhs != this)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user