| 2706 | #endif |
| 2707 | |
| 2708 | BOOL LASreadOpener::add_file_name_single(const CHAR* file_name, BOOL unique) |
| 2709 | { |
| 2710 | if (unique) { |
| 2711 | U32 i; |
| 2712 | for (i = 0; i < file_name_number; i++) { |
| 2713 | if (strcmp(file_names[i], file_name) == 0) { |
| 2714 | return FALSE; |
| 2715 | } |
| 2716 | } |
| 2717 | } |
| 2718 | if (file_name_number == file_name_allocated) { |
| 2719 | if (file_names) { |
| 2720 | file_name_allocated *= 2; |
| 2721 | file_names = (CHAR**)realloc_las(file_names, sizeof(CHAR*) * file_name_allocated); |
| 2722 | } else { |
| 2723 | file_name_allocated = 16; |
| 2724 | file_names = (CHAR**)malloc_las(sizeof(CHAR*) * file_name_allocated); |
| 2725 | } |
| 2726 | if (file_names == 0) { |
| 2727 | laserror("alloc for file_names pointer array failed at %d", file_name_allocated); |
| 2728 | } |
| 2729 | } |
| 2730 | if (file_names != nullptr) file_names[file_name_number] = LASCopyString(file_name); |
| 2731 | file_name_number++; |
| 2732 | return TRUE; |
| 2733 | } |
| 2734 | |
| 2735 | BOOL LASreadOpener::add_file_name(const CHAR* file_name, U32 ID, BOOL unique) { |
| 2736 | if (unique) { |
nothing calls this directly
no test coverage detected