Skip to content

Commit 9a99fe7

Browse files
author
Heiko Thiel
committed
Replaced BOOL by bool
1 parent d0b21d0 commit 9a99fe7

File tree

97 files changed

+1153
-1159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1153
-1159
lines changed

LASlib/inc/lasdefinitions.hpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class LASheader : public LASquantizer, public LASattributer
244244

245245
// set functions
246246

247-
void set_bounding_box(F64 min_x, F64 min_y, F64 min_z, F64 max_x, F64 max_y, F64 max_z, BOOL auto_scale=TRUE, BOOL auto_offset=TRUE)
247+
void set_bounding_box(F64 min_x, F64 min_y, F64 min_z, F64 max_x, F64 max_y, F64 max_z, bool auto_scale=TRUE, bool auto_offset=TRUE)
248248
{
249249
if (auto_scale)
250250
{
@@ -288,9 +288,9 @@ class LASheader : public LASquantizer, public LASattributer
288288
global_encoding |= (1 << bit);
289289
}
290290

291-
BOOL get_global_encoding_bit(I32 bit) const
291+
bool get_global_encoding_bit(I32 bit) const
292292
{
293-
return (BOOL)(global_encoding & (1 << bit));
293+
return (bool)(global_encoding & (1 << bit));
294294
}
295295

296296
// clean functions
@@ -448,7 +448,7 @@ class LASheader : public LASquantizer, public LASattributer
448448
return *this;
449449
};
450450

451-
BOOL check() const
451+
bool check() const
452452
{
453453
if (strncmp(file_signature, "LASF", 4) != 0)
454454
{
@@ -488,7 +488,7 @@ class LASheader : public LASquantizer, public LASattributer
488488
return TRUE;
489489
};
490490

491-
BOOL is_compressed() const
491+
bool is_compressed() const
492492
{
493493
if (laszip)
494494
{
@@ -500,7 +500,7 @@ class LASheader : public LASquantizer, public LASattributer
500500
return FALSE;
501501
};
502502

503-
BOOL is_lonlat() const
503+
bool is_lonlat() const
504504
{
505505
if ((-360.0 <= min_x) && (-90.0 <= min_y) && (max_x <= 360.0) && (max_y <= 90.0))
506506
{
@@ -511,10 +511,10 @@ class LASheader : public LASquantizer, public LASattributer
511511

512512
// note that data needs to be allocated with new [] and not malloc and that LASheader
513513
// will become the owner over this and manage its deallocation
514-
void add_vlr(const CHAR* user_id, const U16 record_id, const U16 record_length_after_header, U8* data, const BOOL keep_description=FALSE, const CHAR* description=0, const BOOL keep_existing=FALSE)
514+
void add_vlr(const CHAR* user_id, const U16 record_id, const U16 record_length_after_header, U8* data, const bool keep_description=FALSE, const CHAR* description=0, const bool keep_existing=FALSE)
515515
{
516516
U32 i = 0;
517-
BOOL found_description = FALSE;
517+
bool found_description = FALSE;
518518
if (vlrs)
519519
{
520520
if (keep_existing)
@@ -591,7 +591,7 @@ class LASheader : public LASquantizer, public LASattributer
591591
return 0;
592592
};
593593

594-
BOOL remove_vlr(U32 i)
594+
bool remove_vlr(U32 i)
595595
{
596596
if (vlrs)
597597
{
@@ -619,7 +619,7 @@ class LASheader : public LASquantizer, public LASattributer
619619
return FALSE;
620620
};
621621

622-
BOOL remove_vlr(const CHAR* user_id, U16 record_id)
622+
bool remove_vlr(const CHAR* user_id, U16 record_id)
623623
{
624624
U32 i;
625625
for (i = 0; i < number_of_variable_length_records; i++)
@@ -632,7 +632,7 @@ class LASheader : public LASquantizer, public LASattributer
632632
return FALSE;
633633
};
634634

635-
void set_lastiling(U32 level, U32 level_index, U32 implicit_levels, BOOL buffer, BOOL reversible, F32 min_x, F32 max_x, F32 min_y, F32 max_y)
635+
void set_lastiling(U32 level, U32 level_index, U32 implicit_levels, bool buffer, bool reversible, F32 min_x, F32 max_x, F32 min_y, F32 max_y)
636636
{
637637
clean_lastiling();
638638
vlr_lastiling = new LASvlr_lastiling();
@@ -687,7 +687,7 @@ class LASheader : public LASquantizer, public LASattributer
687687
vlr_lasoriginal->min_z = min_z;
688688
}
689689

690-
BOOL restore_lasoriginal()
690+
bool restore_lasoriginal()
691691
{
692692
if (vlr_lasoriginal)
693693
{
@@ -808,7 +808,7 @@ class LASheader : public LASquantizer, public LASattributer
808808
}
809809
}
810810

811-
void update_extra_bytes_vlr(const BOOL keep_description=FALSE)
811+
void update_extra_bytes_vlr(const bool keep_description=FALSE)
812812
{
813813
if (number_attributes)
814814
{

LASlib/inc/lasfilter.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class LAScriterion
3838
public:
3939
virtual const CHAR * name() const = 0;
4040
virtual I32 get_command(CHAR* string) const = 0;
41-
virtual BOOL filter(const LASpoint* point) = 0;
41+
virtual bool filter(const LASpoint* point) = 0;
4242
virtual void reset(){};
4343
virtual ~LAScriterion(){};
4444
};
@@ -49,16 +49,16 @@ class LASfilter
4949

5050
void usage() const;
5151
void clean();
52-
BOOL parse(int argc, char* argv[]);
53-
BOOL parse(CHAR* string);
52+
bool parse(int argc, char* argv[]);
53+
bool parse(CHAR* string);
5454
I32 unparse(CHAR* string) const;
55-
inline BOOL active() const { return (num_criteria != 0); };
55+
inline bool active() const { return (num_criteria != 0); };
5656

5757
void addClipCircle(F64 x, F64 y, F64 radius);
5858
void addClipBox(F64 min_x, F64 min_y, F64 min_z, F64 max_x, F64 max_y, F64 max_z);
5959
void addKeepScanDirectionChange();
6060

61-
BOOL filter(const LASpoint* point);
61+
bool filter(const LASpoint* point);
6262
void reset();
6363

6464
LASfilter();

LASlib/inc/lasreader.hpp

+63-63
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class LASLIB_DLL LASreader
5959
I64 p_count;
6060

6161
virtual I32 get_format() const = 0;
62-
virtual BOOL has_layers() const { return FALSE; };
62+
virtual bool has_layers() const { return FALSE; };
6363

6464
void set_index(LASindex* index);
6565
inline LASindex* get_index() const { return index; };
@@ -69,23 +69,23 @@ class LASLIB_DLL LASreader
6969
inline LAStransform* get_transform() const { return transform; };
7070

7171
inline U32 get_inside() const { return inside; };
72-
virtual BOOL inside_none();
73-
virtual BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size);
72+
virtual bool inside_none();
73+
virtual bool inside_tile(const F32 ll_x, const F32 ll_y, const F32 size);
7474
inline F32 get_t_ll_x() const { return t_ll_x; };
7575
inline F32 get_t_ll_y() const { return t_ll_y; };
7676
inline F32 get_t_size() const { return t_size; };
77-
virtual BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius);
77+
virtual bool inside_circle(const F64 center_x, const F64 center_y, const F64 radius);
7878
inline F64 get_c_center_x() const { return c_center_x; };
7979
inline F64 get_c_center_y() const { return c_center_y; };
8080
inline F64 get_c_radius() const { return c_radius; };
81-
virtual BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y);
81+
virtual bool inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y);
8282
inline F64 get_r_min_x() const { return r_min_x; };
8383
inline F64 get_r_min_y() const { return r_min_y; };
8484
inline F64 get_r_max_x() const { return r_max_x; };
8585
inline F64 get_r_max_y() const { return r_max_y; };
8686

87-
virtual BOOL seek(const I64 p_index) = 0;
88-
BOOL read_point() { return (this->*read_simple)(); };
87+
virtual bool seek(const I64 p_index) = 0;
88+
bool read_point() { return (this->*read_simple)(); };
8989

9090
inline void compute_coordinates() { point.compute_coordinates(); };
9191

@@ -110,13 +110,13 @@ class LASLIB_DLL LASreader
110110
inline I32 get_Z(const F64 z) const { return header.get_Z(z); };
111111

112112
virtual ByteStreamIn* get_stream() const = 0;
113-
virtual void close(BOOL close_stream=TRUE) = 0;
113+
virtual void close(bool close_stream=TRUE) = 0;
114114

115115
LASreader();
116116
virtual ~LASreader();
117117

118118
protected:
119-
virtual BOOL read_point_default() = 0;
119+
virtual bool read_point_default() = 0;
120120

121121
LASindex* index;
122122
LASfilter* filter;
@@ -129,20 +129,20 @@ class LASLIB_DLL LASreader
129129
F64 orig_min_x, orig_min_y, orig_max_x, orig_max_y;
130130

131131
private:
132-
BOOL (LASreader::*read_simple)();
133-
BOOL (LASreader::*read_complex)();
134-
135-
BOOL read_point_none();
136-
BOOL read_point_filtered();
137-
BOOL read_point_transformed();
138-
BOOL read_point_filtered_and_transformed();
139-
140-
BOOL read_point_inside_tile();
141-
BOOL read_point_inside_tile_indexed();
142-
BOOL read_point_inside_circle();
143-
BOOL read_point_inside_circle_indexed();
144-
BOOL read_point_inside_rectangle();
145-
BOOL read_point_inside_rectangle_indexed();
132+
bool (LASreader::*read_simple)();
133+
bool (LASreader::*read_complex)();
134+
135+
bool read_point_none();
136+
bool read_point_filtered();
137+
bool read_point_transformed();
138+
bool read_point_filtered_and_transformed();
139+
140+
bool read_point_inside_tile();
141+
bool read_point_inside_tile_indexed();
142+
bool read_point_inside_circle();
143+
bool read_point_inside_circle_indexed();
144+
bool read_point_inside_rectangle();
145+
bool read_point_inside_rectangle_indexed();
146146
};
147147

148148
#include "laswaveform13reader.hpp"
@@ -156,24 +156,24 @@ class LASLIB_DLL LASreadOpener
156156
U32 get_file_name_current() const;
157157
const CHAR* get_file_name() const;
158158
const CHAR* get_file_name(U32 number) const;
159-
void set_file_name(const CHAR* file_name, BOOL unique=FALSE);
160-
BOOL add_file_name(const CHAR* file_name, BOOL unique=FALSE);
161-
BOOL add_list_of_files(const CHAR* list_of_files, BOOL unique=FALSE);
159+
void set_file_name(const CHAR* file_name, bool unique=FALSE);
160+
bool add_file_name(const CHAR* file_name, bool unique=FALSE);
161+
bool add_list_of_files(const CHAR* list_of_files, bool unique=FALSE);
162162
void delete_file_name(U32 file_name_id);
163-
BOOL set_file_name_current(U32 file_name_id);
163+
bool set_file_name_current(U32 file_name_id);
164164
I32 get_file_format(U32 number) const;
165-
void set_merged(const BOOL merged);
166-
BOOL is_merged() const { return merged; };
165+
void set_merged(const bool merged);
166+
bool is_merged() const { return merged; };
167167
void set_buffer_size(const F32 buffer_size);
168168
F32 get_buffer_size() const;
169-
void set_neighbor_file_name(const CHAR* neighbor_file_name, BOOL unique=FALSE);
170-
BOOL add_neighbor_file_name(const CHAR* neighbor_file_name, BOOL unique=FALSE);
171-
void set_auto_reoffset(const BOOL auto_reoffset);
172-
inline BOOL is_auto_reoffset() const { return auto_reoffset; };
173-
void set_files_are_flightlines(const BOOL files_are_flightlines);
174-
inline BOOL are_files_flightlines() const { return files_are_flightlines; };
175-
void set_apply_file_source_ID(const BOOL apply_file_source_ID);
176-
inline BOOL applying_file_source_ID() const { return apply_file_source_ID; };
169+
void set_neighbor_file_name(const CHAR* neighbor_file_name, bool unique=FALSE);
170+
bool add_neighbor_file_name(const CHAR* neighbor_file_name, bool unique=FALSE);
171+
void set_auto_reoffset(const bool auto_reoffset);
172+
inline bool is_auto_reoffset() const { return auto_reoffset; };
173+
void set_files_are_flightlines(const bool files_are_flightlines);
174+
inline bool are_files_flightlines() const { return files_are_flightlines; };
175+
void set_apply_file_source_ID(const bool apply_file_source_ID);
176+
inline bool applying_file_source_ID() const { return apply_file_source_ID; };
177177
void set_scale_factor(const F64* scale_factor);
178178
inline const F64* get_scale_factor() const { return scale_factor; };
179179
void set_offset(const F64* offset);
@@ -185,41 +185,41 @@ class LASLIB_DLL LASreadOpener
185185
void add_attribute(I32 data_type, const CHAR* name, const CHAR* description=0, F64 scale=1.0, F64 offset=0.0, F64 pre_scale=1.0, F64 pre_offset=0.0);
186186
void set_parse_string(const CHAR* parse_string);
187187
void set_skip_lines(I32 skip_lines);
188-
void set_populate_header(BOOL populate_header);
189-
void set_keep_lastiling(BOOL keep_lastiling);
190-
void set_pipe_on(BOOL pipe_on);
188+
void set_populate_header(bool populate_header);
189+
void set_keep_lastiling(bool keep_lastiling);
190+
void set_pipe_on(bool pipe_on);
191191
const CHAR* get_parse_string() const;
192192
void usage() const;
193193
void set_inside_tile(const F32 ll_x, const F32 ll_y, const F32 size);
194194
void set_inside_circle(const F64 center_x, const F64 center_y, const F64 radius);
195195
void set_inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y);
196-
BOOL parse(int argc, char* argv[]);
197-
BOOL is_piped() const;
198-
BOOL is_buffered() const;
199-
BOOL is_header_populated() const;
200-
BOOL active() const;
201-
BOOL is_inside() const;
196+
bool parse(int argc, char* argv[]);
197+
bool is_piped() const;
198+
bool is_buffered() const;
199+
bool is_header_populated() const;
200+
bool active() const;
201+
bool is_inside() const;
202202
I32 unparse(CHAR* string) const;
203203
void set_filter(LASfilter* filter);
204204
const LASfilter* get_filter() { return filter; };
205205
void set_transform(LAStransform* transform);
206206
const LAStransform* get_transform() { return transform; };
207207
void reset();
208208
const CHAR* get_temp_file_base() const { return temp_file_base; };
209-
LASreader* open(const CHAR* other_file_name=0, BOOL reset_after_other=TRUE);
210-
BOOL reopen(LASreader* lasreader, BOOL remain_buffered=TRUE);
209+
LASreader* open(const CHAR* other_file_name=0, bool reset_after_other=TRUE);
210+
bool reopen(LASreader* lasreader, bool remain_buffered=TRUE);
211211
LASwaveform13reader* open_waveform13(const LASheader* lasheader);
212212
LASreadOpener();
213213
~LASreadOpener();
214214
private:
215215
#ifdef _WIN32
216-
BOOL add_file_name_single(const CHAR* file_name, BOOL unique=FALSE);
217-
BOOL add_neighbor_file_name_single(const CHAR* neighbor_file_name, BOOL unique=FALSE);
216+
bool add_file_name_single(const CHAR* file_name, bool unique=FALSE);
217+
bool add_neighbor_file_name_single(const CHAR* neighbor_file_name, bool unique=FALSE);
218218
#endif
219219
I32 io_ibuffer_size;
220220
CHAR** file_names;
221221
const CHAR* file_name;
222-
BOOL merged;
222+
bool merged;
223223
U32 file_name_number;
224224
U32 file_name_allocated;
225225
U32 file_name_current;
@@ -228,15 +228,15 @@ class LASLIB_DLL LASreadOpener
228228
CHAR** neighbor_file_names;
229229
U32 neighbor_file_name_number;
230230
U32 neighbor_file_name_allocated;
231-
BOOL comma_not_point;
231+
bool comma_not_point;
232232
F64* scale_factor;
233233
F64* offset;
234-
BOOL auto_reoffset;
235-
BOOL files_are_flightlines;
236-
BOOL apply_file_source_ID;
237-
BOOL itxt;
238-
BOOL ipts;
239-
BOOL iptx;
234+
bool auto_reoffset;
235+
bool files_are_flightlines;
236+
bool apply_file_source_ID;
237+
bool itxt;
238+
bool ipts;
239+
bool iptx;
240240
F32 translate_intensity;
241241
F32 scale_intensity;
242242
F32 translate_scan_angle;
@@ -251,11 +251,11 @@ class LASLIB_DLL LASreadOpener
251251
F64 attribute_pre_offsets[10];
252252
CHAR* parse_string;
253253
I32 skip_lines;
254-
BOOL populate_header;
255-
BOOL keep_lastiling;
256-
BOOL pipe_on;
257-
BOOL use_stdin;
258-
BOOL unique;
254+
bool populate_header;
255+
bool keep_lastiling;
256+
bool pipe_on;
257+
bool use_stdin;
258+
bool unique;
259259

260260
// optional extras
261261
LASindex* index;

0 commit comments

Comments
 (0)