fix gcc errors about reference to temporary
This commit is contained in:
parent
33745c3cb8
commit
fd28067b5c
|
|
@ -147,12 +147,26 @@ public:
|
|||
|
||||
constexpr V &operator[](const size_t &index)
|
||||
{
|
||||
return (index == 0 ? m_mins : index == 1 ? m_maxs : throw std::exception());
|
||||
switch (index) {
|
||||
case 0:
|
||||
return m_mins;
|
||||
case 1:
|
||||
return m_maxs;
|
||||
default:
|
||||
throw std::exception();
|
||||
}
|
||||
}
|
||||
|
||||
constexpr const V &operator[](const size_t &index) const
|
||||
{
|
||||
return (index == 0 ? m_mins : index == 1 ? m_maxs : throw std::exception());
|
||||
switch (index) {
|
||||
case 0:
|
||||
return m_mins;
|
||||
case 1:
|
||||
return m_maxs;
|
||||
default:
|
||||
throw std::exception();
|
||||
}
|
||||
}
|
||||
|
||||
constexpr V centroid() const { return (m_mins + m_maxs) * 0.5; }
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ static texdef_quake_ed_t TexDef_BSPToQuakeEd(
|
|||
const texdef_quake_ed_noshift_t res = Reverse_QuakeEd(texPlaneToUV, &faceplane, false);
|
||||
|
||||
// figure out shift based on facepoints[0]
|
||||
const qvec3f &testpoint = facepoints[0];
|
||||
const qvec3f testpoint = facepoints[0];
|
||||
qvec2f uv0_actual = evalTexDefAtPoint(addShift(res, qvec2f(0, 0)), &faceplane, testpoint);
|
||||
qvec2f uv0_desired = qvec2f(worldToTexSpace * qvec4f(testpoint[0], testpoint[1], testpoint[2], 1.0f));
|
||||
qvec2f shift = uv0_desired - uv0_actual;
|
||||
|
|
|
|||
Loading…
Reference in New Issue