add const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
3e97850e97
commit
dd3b3d4ff4
@ -71,7 +71,7 @@ std::string getEnv(int env_var) {
|
||||
|
||||
/// @brief Convert an integer value to its hex character.
|
||||
char to_hex(char code) {
|
||||
static char hex[] = "0123456789abcdef";
|
||||
static const char hex[] = "0123456789abcdef";
|
||||
return hex[code & 15];
|
||||
}
|
||||
|
||||
|
||||
@ -476,10 +476,11 @@ DataBuf PngChunk::readRawProfile(const DataBuf& text, bool iTXt) {
|
||||
}
|
||||
|
||||
DataBuf info;
|
||||
unsigned char unhex[103] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,
|
||||
4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15};
|
||||
const unsigned char unhex[103] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15,
|
||||
};
|
||||
|
||||
if (iTXt) {
|
||||
info.alloc(text.size());
|
||||
@ -581,7 +582,7 @@ DataBuf PngChunk::readRawProfile(const DataBuf& text, bool iTXt) {
|
||||
} // PngChunk::readRawProfile
|
||||
|
||||
std::string PngChunk::writeRawProfile(const std::string& profileData, const char* profileType) {
|
||||
static byte hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
||||
static const byte hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << '\n' << profileType << '\n' << std::setw(8) << profileData.size();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user