Merge pull request #266 from RameshRavone/pathch-1

fix shadows template parameter
pull/269/head
Bastiaan Olij 2019-04-14 21:25:38 +10:00 committed by GitHub
commit 971adbd955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -22,27 +22,27 @@ private:
template <int column> template <int column>
class ColumnVector3 { class ColumnVector3 {
private: private:
template <int column, int component> template <int column1, int component>
class ColumnVectorComponent { class ColumnVectorComponent {
private: private:
Vector3 elements[3]; Vector3 elements[3];
protected: protected:
inline ColumnVectorComponent<column, component> &operator=(const ColumnVectorComponent<column, component> &p_value) { inline ColumnVectorComponent<column1, component> &operator=(const ColumnVectorComponent<column1, component> &p_value) {
return *this = real_t(p_value); return *this = real_t(p_value);
} }
inline ColumnVectorComponent(const ColumnVectorComponent<column, component> &p_value) { inline ColumnVectorComponent(const ColumnVectorComponent<column1, component> &p_value) {
*this = real_t(p_value); *this = real_t(p_value);
} }
inline ColumnVectorComponent<column, component> &operator=(const real_t &p_value) { inline ColumnVectorComponent<column1, component> &operator=(const real_t &p_value) {
element[component][column] = p_value; elements[component][column1] = p_value;
return *this; return *this;
} }
inline operator real_t() const { inline operator real_t() const {
return element[component][column]; return elements[component][column1];
} }
}; };
@ -271,7 +271,7 @@ private:
} }
inline operator String() const { inline operator String() const {
return String(Vector3(*this)) return String(Vector3(*this));
} }
}; };