[vlmc-devel] commit: Returning -1 from unsigned method is most of the time a very bad idea. ( Ludovic Fauvet )
git at videolan.org
git at videolan.org
Tue Mar 30 02:36:24 CEST 2010
vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Tue Mar 30 02:34:18 2010 +0200| [8da15a5ad5183ce50e9ed0a8dbc2c7e3c3987878] | committer: Ludovic Fauvet
Returning -1 from unsigned method is most of the time a very bad idea.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=8da15a5ad5183ce50e9ed0a8dbc2c7e3c3987878
---
src/Gui/timeline/AbstractGraphicsMediaItem.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index a9ae3e1..09ed114 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -80,7 +80,9 @@ quint32 AbstractGraphicsMediaItem::trackNumber()
if ( graphicsTrack )
return graphicsTrack->trackNumber();
}
- return -1;
+ //FIXME We should probably return a negative number here (using a signed type!)
+ qWarning( "Things can go wrong beyond that point!" );
+ return 0;
}
void AbstractGraphicsMediaItem::setTrack( GraphicsTrack* track )
More information about the Vlmc-devel
mailing list