mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
help the compiler create more efficient code
Patch from Michael <virtual_worlds@gmx.de> Full text: As usual I have modified only minor things to remove warnigs when compiled as C++ code, have added some const-specifiers where possible to help the compiler create more efficient code and added some static-specifiers to make functions invisible to other modules.
This commit is contained in:
@ -56,7 +56,7 @@ static char *TeleTable[] = {
|
||||
"3113111113", "11311111111111", "331111111111", "111113111113", "31111111111111", "111311111113", "131111111113"
|
||||
};
|
||||
|
||||
int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
||||
int telepen(struct zint_symbol *symbol, unsigned char source[], const size_t src_len) {
|
||||
unsigned int i, count, check_digit;
|
||||
int error_number;
|
||||
char dest[512]; /*14 + 30 * 14 + 14 + 14 + 1 ~ 512 */
|
||||
@ -103,9 +103,10 @@ int telepen(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
||||
return error_number;
|
||||
}
|
||||
|
||||
int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
||||
unsigned int i, count, check_digit, glyph;
|
||||
int error_number, temp_length = src_len;
|
||||
int telepen_num(struct zint_symbol *symbol, unsigned char source[], const size_t src_len) {
|
||||
unsigned int count, check_digit, glyph;
|
||||
int error_number;
|
||||
size_t i,temp_length = src_len;
|
||||
char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */
|
||||
unsigned char temp[64];
|
||||
|
||||
|
Reference in New Issue
Block a user