logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shuvalov, Andrew V" <Andrew.Shuva...@gs.com>
Subject Small fix of confusing variable name
Date Fri, 14 May 2004 17:03:32 GMT
Hi,

I don't think it affects many people, but I had a compile error because
apparently somewhere in our headers the word "null" is defined to mean
something. And it is used as parameter name in helpers/objectptr.h. I
totally agree that this is our fault, not log4cxx bug, but anyway - the
local variable name "null" is bad. There is a chance that some other
software has it defined to be something.

Here is the patch:

diff
/ny/blasto/Prel/REPO/ASFlog/DELIV/sun-sparc-SunOS5.8/0.9.7/include/log4cxx/h
elpers/objectptr.h ~/local/log4cxx-0.9.7/include/log4cxx/helpers/objectptr.h

51c51
< 			ObjectPtrT(const int& mustbenull)
//throw(IllegalArgumentException)
---
> 			ObjectPtrT(const int& null)
//throw(IllegalArgumentException)
54c54
< 				if (mustbenull != 0)
---
> 				if (null != 0)
116c116
< 			ObjectPtrT& operator=(const int& mustbenull)
//throw(IllegalArgumentException)
---
> 			ObjectPtrT& operator=(const int& null)
//throw(IllegalArgumentException)
118c118
< 				if (mustbenull != 0)
---
> 				if (null != 0)



Mime
View raw message