diff --git a/nif_attrs.h b/nif_attrs.h index 6bf2227755e4665dc97b02849cca6fa7e180b4c2..b5a8a63d97ee83b7578be471fe5bb5751ec2a28a 100644 --- a/nif_attrs.h +++ b/nif_attrs.h @@ -64,7 +64,7 @@ public: //Setters void Set(int) { throw runtime_error(ATTRERR); } void Set(float) { throw runtime_error(ATTRERR); } - void Set(float, float, float) { throw runtime_error(ATTRERR); } + void Set(Float3&) { throw runtime_error(ATTRERR); } void Set(string&) { throw runtime_error(ATTRERR); } void Set(Matrix33&) { throw runtime_error(ATTRERR); } void Set(blk_ref&) { throw runtime_error(ATTRERR); } @@ -276,7 +276,7 @@ public: return out.str(); } Float3 asFloat3() const { return data; } - void Set(float n0, float n1, float n2) { data[0] = n0; data[1] = n1; data[2] = n2; } + void Set(Float3& n) { data = n; } //vector<float> asFloatList() const { // vector<float> list(3); diff --git a/niflib.h b/niflib.h index 22fbd9ec4544d188c5375da0ca067cc08a0a5e3a..fce6885aa41dbd482287caaf5b5ce74fd9fae216 100644 --- a/niflib.h +++ b/niflib.h @@ -317,7 +317,7 @@ public: //Setters virtual void Set(int) = 0; virtual void Set(float) = 0; - virtual void Set(float, float, float) = 0; + virtual void Set(Float3&) = 0; virtual void Set(string&) = 0; virtual void Set(Matrix33&) = 0; virtual void Set( blk_ref & n ) = 0; @@ -480,7 +480,7 @@ public: return *this; } attr_ref & operator=(Float3 & n) { - _attr->Set(n[0], n[1], n[2]); + _attr->Set(n); return *this; } attr_ref & operator=(string & n) {