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
return (float&)fp32i;
}
half &half::operator=(half h)
{
fp16i = h.fp16i;
return *this;
}
half &half::operator=(float f)
{
*this = half(f);
......
......@@ -21,11 +21,12 @@ namespace sw
{
public:
half() = default;
half(const half& h) = default;
explicit half(float f);
operator float() const;
half &operator=(half h);
half &operator=(const half& h) = default;
half &operator=(float f);
private:
......
......@@ -213,6 +213,7 @@ public:
using reference_underlying_type = T;
explicit Reference(Value *pointer, int alignment = 1);
Reference(const Reference<T> &ref);
RValue<T> operator=(RValue<T> rhs) const;
RValue<T> operator=(const Reference<T> &ref) const;
......@@ -2702,6 +2703,9 @@ Reference<T>::Reference(Value *pointer, int alignment)
}
template<class T>
Reference<T>::Reference(const Reference<T> &ref) = default;
template<class T>
RValue<T> Reference<T>::operator=(RValue<T> rhs) const
{
Nucleus::createStore(rhs.value(), address, T::type(), false, alignment);
......
......@@ -100,6 +100,8 @@ namespace sw
{
}
Register(const Register &rhs) = default;
Reference<Float4> &operator[](int i)
{
switch(i)
......@@ -112,15 +114,7 @@ namespace sw
}
}
Register &operator=(const Register &rhs)
{
x = rhs.x;
y = rhs.y;
z = rhs.z;
w = rhs.w;
return *this;
}
Register &operator=(const Register &rhs) = default;
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