Mercurial > hg > octave-lyh
comparison liboctave/idx-vector.cc @ 8333:9238637cb81c
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 18 Nov 2008 11:14:31 -0500 |
parents | c374691576f6 |
children | 445d27d79f4e |
comparison
equal
deleted
inserted
replaced
8332:34fde4755a0f | 8333:9238637cb81c |
---|---|
35 #include "Range.h" | 35 #include "Range.h" |
36 | 36 |
37 #include "lo-error.h" | 37 #include "lo-error.h" |
38 #include "lo-mappers.h" | 38 #include "lo-mappers.h" |
39 | 39 |
40 static void gripe_invalid_index () | 40 static void |
41 gripe_invalid_index (void) | |
41 { | 42 { |
42 (*current_liboctave_error_handler) | 43 (*current_liboctave_error_handler) |
43 ("subscript indices must be either positive integers or logicals."); | 44 ("subscript indices must be either positive integers or logicals."); |
44 } | 45 } |
45 | 46 |
46 static void gripe_invalid_range () | 47 static void |
48 gripe_invalid_range (void) | |
47 { | 49 { |
48 (*current_liboctave_error_handler) | 50 (*current_liboctave_error_handler) |
49 ("invalid range used as index."); | 51 ("invalid range used as index."); |
50 } | 52 } |
51 | 53 |
52 static void gripe_index_out_of_range () | 54 static void |
55 gripe_index_out_of_range (void) | |
53 { | 56 { |
54 (*current_liboctave_error_handler) | 57 (*current_liboctave_error_handler) |
55 ("internal error: idx_vector index out of range."); | 58 ("internal error: idx_vector index out of range."); |
56 } | 59 } |
57 | 60 |
97 gripe_invalid_index (); | 100 gripe_invalid_index (); |
98 err = true; | 101 err = true; |
99 } | 102 } |
100 } | 103 } |
101 | 104 |
102 static void gripe_non_int_range () | 105 static void |
106 gripe_non_int_range (void) | |
103 { | 107 { |
104 (*current_liboctave_error_handler) | 108 (*current_liboctave_error_handler) |
105 ("If a range is used as subscript, all elements are expected to be integers."); | 109 ("If a range is used as subscript, all elements are expected to be integers."); |
106 } | 110 } |
107 | 111 |
456 } | 460 } |
457 | 461 |
458 return reduced; | 462 return reduced; |
459 } | 463 } |
460 | 464 |
461 bool idx_vector::is_cont_range (octave_idx_type n, | 465 bool |
462 octave_idx_type& l, octave_idx_type& u) const | 466 idx_vector::is_cont_range (octave_idx_type n, |
467 octave_idx_type& l, octave_idx_type& u) const | |
463 { | 468 { |
464 bool res = false; | 469 bool res = false; |
465 switch (rep->idx_class ()) | 470 switch (rep->idx_class ()) |
466 { | 471 { |
467 case class_colon: | 472 case class_colon: |