MCPcopy Create free account
hub / github.com/LASzip/LASzip / check_items

Method check_items

src/laszip.cpp:280–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280bool LASzip::check_items(const U16 num_items, const LASitem* items, const U16 point_size)
281{
282 if (num_items == 0) return return_error("number of items cannot be zero");
283 if (items == 0) return return_error("items pointer cannot be NULL");
284 U16 i;
285 U16 size = 0;
286 for (i = 0; i < num_items; i++)
287 {
288 if (!check_item(&items[i])) return false;
289 size += items[i].size;
290 }
291 if (point_size && (point_size != size))
292 {
293 CHAR temp[66];
294 snprintf(temp, sizeof(temp), "point has size of %d but items only add up to %d bytes", point_size, size);
295 return return_error(temp);
296 }
297 return true;
298}
299
300bool LASzip::check(const U16 point_size)
301{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected