Skip to content

Commit 3bbfb44

Browse files
committed
Restore LLMaterialID to POD type
Signed-off-by: Rye <[email protected]>
1 parent c13be7f commit 3bbfb44

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

indra/llprimitive/llmaterialid.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,11 @@ LLMaterialID::LLMaterialID(const void* pMemory)
5656
set(pMemory);
5757
}
5858

59-
LLMaterialID::LLMaterialID(const LLMaterialID& pOtherMaterialID)
60-
{
61-
copyFromOtherMaterialID(pOtherMaterialID);
62-
}
63-
6459
LLMaterialID::LLMaterialID(const LLUUID& lluid)
6560
{
6661
set(lluid.mData);
6762
}
6863

69-
LLMaterialID::~LLMaterialID()
70-
{
71-
}
72-
7364
bool LLMaterialID::operator == (const LLMaterialID& pOtherMaterialID) const
7465
{
7566
return (compareToOtherMaterialID(pOtherMaterialID) == 0);
@@ -100,12 +91,6 @@ bool LLMaterialID::operator >= (const LLMaterialID& pOtherMaterialID) const
10091
return (compareToOtherMaterialID(pOtherMaterialID) >= 0);
10192
}
10293

103-
LLMaterialID& LLMaterialID::operator = (const LLMaterialID& pOtherMaterialID)
104-
{
105-
copyFromOtherMaterialID(pOtherMaterialID);
106-
return (*this);
107-
}
108-
10994
bool LLMaterialID::isNull() const
11095
{
11196
return (compareToOtherMaterialID(LLMaterialID::null) == 0);
@@ -168,18 +153,12 @@ std::ostream& operator<<(std::ostream& s, const LLMaterialID &material_id)
168153
return s;
169154
}
170155

171-
172156
void LLMaterialID::parseFromBinary (const LLSD::Binary& pMaterialID)
173157
{
174158
llassert(pMaterialID.size() == (MATERIAL_ID_SIZE * sizeof(U8)));
175159
memcpy(mID, &pMaterialID[0], MATERIAL_ID_SIZE * sizeof(U8));
176160
}
177161

178-
void LLMaterialID::copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID)
179-
{
180-
memcpy(mID, pOtherMaterialID.get(), MATERIAL_ID_SIZE * sizeof(U8));
181-
}
182-
183162
int LLMaterialID::compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const
184163
{
185164
int retVal = 0;

indra/llprimitive/llmaterialid.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ class LLMaterialID
3939
LLMaterialID(const LLSD& pMaterialID);
4040
LLMaterialID(const LLSD::Binary& pMaterialID);
4141
LLMaterialID(const void* pMemory);
42-
LLMaterialID(const LLMaterialID& pOtherMaterialID);
4342
LLMaterialID(const LLUUID& lluid);
44-
~LLMaterialID();
4543

4644
bool operator == (const LLMaterialID& pOtherMaterialID) const;
4745
bool operator != (const LLMaterialID& pOtherMaterialID) const;
@@ -51,8 +49,6 @@ class LLMaterialID
5149
bool operator > (const LLMaterialID& pOtherMaterialID) const;
5250
bool operator >= (const LLMaterialID& pOtherMaterialID) const;
5351

54-
LLMaterialID& operator = (const LLMaterialID& pOtherMaterialID);
55-
5652
bool isNull() const;
5753

5854
const U8* get() const;
@@ -77,7 +73,6 @@ class LLMaterialID
7773

7874
private:
7975
void parseFromBinary(const LLSD::Binary& pMaterialID);
80-
void copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID);
8176
int compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const;
8277

8378
U8 mID[MATERIAL_ID_SIZE];

indra/llprimitive/tests/llprimitive_test.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ class DummyVolumeMgr : public LLVolumeMgr
7171
S32 mCurrDetailTest;
7272
};
7373

74-
LLMaterialID::LLMaterialID() {}
75-
LLMaterialID::LLMaterialID(LLMaterialID const &m) = default;
76-
LLMaterialID::~LLMaterialID() {}
74+
LLMaterialID::LLMaterialID() = default;
7775
void LLMaterialID::set(void const*) { }
7876
U8 const * LLMaterialID::get() const { return mID; }
7977

0 commit comments

Comments
 (0)