1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Be const correct

llvm-svn: 10856
This commit is contained in:
Chris Lattner 2004-01-14 18:41:38 +00:00
parent 8767bd75e4
commit 78ad123c78

View File

@ -122,13 +122,13 @@ static inline void output(const std::string &s, std::deque<unsigned char> &Out,
align32(Out); // Make sure we are now aligned...
}
static inline void output_data(void *Ptr, void *End,
static inline void output_data(const void *Ptr, const void *End,
std::deque<unsigned char> &Out,
bool Align = false) {
#ifdef ENDIAN_LITTLE
Out.insert(Out.end(), (unsigned char*)Ptr, (unsigned char*)End);
Out.insert(Out.end(), (const unsigned char*)Ptr, (const unsigned char*)End);
#else
unsigned char *E = (unsigned char *)End;
const unsigned char *E = (const unsigned char *)End;
while (Ptr != E)
Out.push_back(*--E);
#endif