Mercurial > hg > octave-lyh
comparison liboctave/Range.cc @ 6490:0ad7655cf2bc
[project @ 2007-04-05 02:44:34 by jwe]
author | jwe |
---|---|
date | Thu, 05 Apr 2007 02:44:35 +0000 |
parents | a58b5981ab65 |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
6489:39eb39d67dd8 | 6490:0ad7655cf2bc |
---|---|
24 #ifdef HAVE_CONFIG_H | 24 #ifdef HAVE_CONFIG_H |
25 #include <config.h> | 25 #include <config.h> |
26 #endif | 26 #endif |
27 | 27 |
28 #include <cfloat> | 28 #include <cfloat> |
29 #include <climits> | |
30 #include <cmath> | 29 #include <cmath> |
31 | 30 |
32 #include <iostream> | 31 #include <iostream> |
32 #include <limits> | |
33 | 33 |
34 #include "Range.h" | 34 #include "Range.h" |
35 #include "lo-mappers.h" | 35 #include "lo-mappers.h" |
36 #include "lo-utils.h" | 36 #include "lo-utils.h" |
37 | 37 |
285 n_elt--; | 285 n_elt--; |
286 else if (teq (rng_base + n_elt * rng_inc, rng_limit)) | 286 else if (teq (rng_base + n_elt * rng_inc, rng_limit)) |
287 n_elt++; | 287 n_elt++; |
288 } | 288 } |
289 | 289 |
290 retval = (n_elt >= INT_MAX - 1) ? -1 : n_elt; | 290 retval = (n_elt >= std::numeric_limits<octave_idx_type>::max () - 1) ? -1 : n_elt; |
291 } | 291 } |
292 | 292 |
293 return retval; | 293 return retval; |
294 } | 294 } |
295 | 295 |