Fix -Wdeprecated-copy.

Bug: chromium:1213098 Change-Id: Ief039d18b65eb338f42e60f78c864c52bc9becc1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54928 Kokoro-Result: kokoro <noreply+kokoro@google.com> Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarPeter Kasting <pkasting@google.com> Commit-Queue: Peter Kasting <pkasting@google.com>
parent 84bc1982
...@@ -85,14 +85,6 @@ namespace sw ...@@ -85,14 +85,6 @@ namespace sw
return (float&)fp32i; return (float&)fp32i;
} }
half &half::operator=(half h)
{
fp16i = h.fp16i;
return *this;
}
half &half::operator=(float f) half &half::operator=(float f)
{ {
*this = half(f); *this = half(f);
......
...@@ -21,11 +21,12 @@ namespace sw ...@@ -21,11 +21,12 @@ namespace sw
{ {
public: public:
half() = default; half() = default;
half(const half& h) = default;
explicit half(float f); explicit half(float f);
operator float() const; operator float() const;
half &operator=(half h); half &operator=(const half& h) = default;
half &operator=(float f); half &operator=(float f);
private: private:
......
...@@ -213,6 +213,7 @@ public: ...@@ -213,6 +213,7 @@ public:
using reference_underlying_type = T; using reference_underlying_type = T;
explicit Reference(Value *pointer, int alignment = 1); explicit Reference(Value *pointer, int alignment = 1);
Reference(const Reference<T> &ref);
RValue<T> operator=(RValue<T> rhs) const; RValue<T> operator=(RValue<T> rhs) const;
RValue<T> operator=(const Reference<T> &ref) const; RValue<T> operator=(const Reference<T> &ref) const;
...@@ -2702,6 +2703,9 @@ Reference<T>::Reference(Value *pointer, int alignment) ...@@ -2702,6 +2703,9 @@ Reference<T>::Reference(Value *pointer, int alignment)
} }
template<class T> template<class T>
Reference<T>::Reference(const Reference<T> &ref) = default;
template<class T>
RValue<T> Reference<T>::operator=(RValue<T> rhs) const RValue<T> Reference<T>::operator=(RValue<T> rhs) const
{ {
Nucleus::createStore(rhs.value(), address, T::type(), false, alignment); Nucleus::createStore(rhs.value(), address, T::type(), false, alignment);
......
...@@ -100,6 +100,8 @@ namespace sw ...@@ -100,6 +100,8 @@ namespace sw
{ {
} }
Register(const Register &rhs) = default;
Reference<Float4> &operator[](int i) Reference<Float4> &operator[](int i)
{ {
switch(i) switch(i)
...@@ -112,15 +114,7 @@ namespace sw ...@@ -112,15 +114,7 @@ namespace sw
} }
} }
Register &operator=(const Register &rhs) Register &operator=(const Register &rhs) = default;
{
x = rhs.x;
y = rhs.y;
z = rhs.z;
w = rhs.w;
return *this;
}
Register &operator=(const Vector4f &rhs) Register &operator=(const Vector4f &rhs)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment