[SQLx.inc] possible typo?
trunk/plugins/include/sqlx.inc
Code:
Shouldn't the following pass a value of sizeof(get_type)-1 = 11 instead of 12? Code:
Is there any performance disadvantage to using sizeof directives in stocks like this? It seems like it would be a better or safer practice to have declaration-relative maxlens automatically put in place by the machine. |
Re: [SQLx.inc] possible typo?
First of all, I'm not sure if I'm making sense here.
I just wanted to say that sizeof will not affect performance, it's handled at compiletime, not at runtime. |
Re: [SQLx.inc] possible typo?
It should be 11, however using sizeof really wouldn't make sense since you know the size.
|
Re: [SQLx.inc] possible typo?
This is indeed a typo. sizeof() is encouraged on local variables whose size is pre-defined, since you don't have to update constants throughout code.
|
Re: [SQLx.inc] possible typo?
Thanks for the report. This is fixed as revision 3174.
|
All times are GMT -4. The time now is 21:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.