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:
Robin Stuart 2010-07-19 09:53:09 +01:00
parent 6902ad1e80
commit 1cca83855e

View File

@ -56,10 +56,8 @@ struct zint_symbol *ZBarcode_Create()
symbol->show_hrt = 1; // Show human readable text
symbol->input_mode = DATA_MODE;
strcpy(symbol->primary, "");
memset(&(symbol->encoded_data[0][0]),0,sizeof(symbol->encoded_data));
for(i = 0; i < 178; i++) {
for(j = 0; j < 1000; j++) {
unset_module(symbol, i, j);
}
symbol->row_height[i] = 0;
}
symbol->bitmap = NULL;