mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Performance improvement
Use memset instead of a for loop to improve performance. As submitted by "Rajesh George" <rajesh_s_george@yahoo.com>
This commit is contained in:
parent
6902ad1e80
commit
1cca83855e
@ -56,10 +56,8 @@ struct zint_symbol *ZBarcode_Create()
|
|||||||
symbol->show_hrt = 1; // Show human readable text
|
symbol->show_hrt = 1; // Show human readable text
|
||||||
symbol->input_mode = DATA_MODE;
|
symbol->input_mode = DATA_MODE;
|
||||||
strcpy(symbol->primary, "");
|
strcpy(symbol->primary, "");
|
||||||
|
memset(&(symbol->encoded_data[0][0]),0,sizeof(symbol->encoded_data));
|
||||||
for(i = 0; i < 178; i++) {
|
for(i = 0; i < 178; i++) {
|
||||||
for(j = 0; j < 1000; j++) {
|
|
||||||
unset_module(symbol, i, j);
|
|
||||||
}
|
|
||||||
symbol->row_height[i] = 0;
|
symbol->row_height[i] = 0;
|
||||||
}
|
}
|
||||||
symbol->bitmap = NULL;
|
symbol->bitmap = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user