Postings tagged with code style
Operator Overloading
Just wondered right now why Qt doesn't provide a greater-than operator for QSize.
Well, indeed: How would you define this operator? Maybe like this?
inline bool
operator >(const QSize &a, const QSize &b)
{
return a.width() * a.height() > b.width() * b.height();
}
Or is this the proper definition?
...
Changelogs and Fortune Cookies
Nasrudin walked into a teahouse and declaimed, "The moon is more useful than the sun."
"Why?", he was asked.
"Because at night we need the light more."
Regularly applaud myself for changing my prepare-changelog script to yield a random fortune cookie with each changelog entry:
`/usr/games/fortune -s wisdom`
Quite entertaining.
...
#ifndef LIBRARY_IS_GPL
There are libraries, which are licensed under GPL, instead of LGPL. This puts people under the risk of accidentely violating the copyright of that library, by using the GPL library from some LGPL library for instance. Well, also could be that doing that changes the license of your LGPL library to GPL or whatever. Don't really want to think about the horrible implications of accidently using a GPL ...
Re: g-thread-cancel
Richard, I'd really like to answer you, and this is the second time I'd like to do that, but unfortunatly you do not allow comments on your blog.
Well, before my karma reaches unknown depths let's add some real content to this posting:
I don't really know, why that function is missing, but my guess it, that randomly killing threads is quite dangerous, as threads share the process with your program. Stopping the thread at some random ...
libzip supports PPMd
Got some WinZIP compressed archive using their propritary PPMd compression today. The evaluation period of my Wine powered copy of WinZIP has expired and I was not willing to renew it. Documentation for their PPMd is available, so I added PPMd support to libzip. Actually I already looked at it some months ago, but was too embaressed by Dmitry Shkarin's coding style ...