[CrystalSpace] #992: Use csArrayItemNotFound in stringarray.h
"CrystalSpace" <[email protected]> Mon, 29 Jul 2013 04:38:56 -0000
| Newsgroups | gmane.comp.graphics.crystalspace.tracker |
|---|---|
| Message-ID | <[email protected]> |
#992: Use csArrayItemNotFound in stringarray.h
---------------------------+------------------------------------------------
Reporter: ralphcampbell | Owner: jorrit
Type: task | Status: new
Priority: minimal | Milestone:
Component: general | Version: V2.1
Keywords: |
---------------------------+------------------------------------------------
Just a style change, not a bug, but csArrayItemNotFound should be used
instead of the actual value (size_t)-1.
Also, a minor comment change since there is no `threshold` argument.
{{{
===================================================================
--- include/csutil/stringarray.h (revision 39526)
+++ include/csutil/stringarray.h (working copy)
@@ -71,7 +71,7 @@
public:
/**
* Initialize object to hold initially \c limit elements, and increase
- * storage by \c threshold each time the upper bound is exceeded.
+ * storage by \c CapacityHandler each time the upper bound is exceeded.
*/
StringArray (size_t limit = 0, const CapacityHandler& ch =
CapacityHandler())
: superclass(limit, ch)
@@ -176,7 +176,7 @@
for (size_t i = 0; i < this->GetSize (); i++)
if (! strcmp (this->Get (i), str))
return i;
- return (size_t)-1;
+ return csArrayItemNotFound;
}
/**
@@ -204,7 +204,7 @@
for (size_t i = 0; i < this->GetSize (); i++)
if (!csStrCaseCmp (this->Get (i), str))
return i;
- return (size_t)-1;
+ return csArrayItemNotFound;
}
/**
}}}
--
Ticket URL: <http://www.crystalspace3d.org/trac/CS/ticket/992>
CrystalSpace <http://www.crystalspace3d.org/>
Free open-source 3D SDK.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk