Skip to content

Commit 04aea46

Browse files
committed
Remove BOM in Interface.h
Add include for rand() and srand() in IfcGuidHelper.cpp Remove dependency on nullptr for older compilers
1 parent f6e3331 commit 04aea46

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/ifcparse/IfcCharacterDecoder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ IfcCharacterDecoder::IfcCharacterDecoder(IfcParse::File* f) {
9292
#ifdef HAVE_ICU
9393
if (destination) ucnv_close(destination);
9494
if (compatibility_converter) ucnv_close(compatibility_converter);
95-
destination = nullptr;
96-
compatibility_converter = nullptr;
95+
destination = 0;
96+
compatibility_converter = 0;
9797

9898
if (mode == DEFAULT) {
99-
destination = ucnv_open(nullptr, &status);
99+
destination = ucnv_open(0, &status);
100100
} else if (mode == UTF8) {
101101
destination = ucnv_open("utf-8", &status);
102102
} else if (mode == LATIN) {
@@ -113,9 +113,9 @@ IfcCharacterDecoder::~IfcCharacterDecoder() {
113113
if ( destination ) ucnv_close(destination);
114114
if ( converter ) ucnv_close(converter);
115115
if ( compatibility_converter ) ucnv_close(compatibility_converter);
116-
destination = nullptr;
117-
converter = nullptr;
118-
compatibility_converter = nullptr;
116+
destination = 0;
117+
converter = 0;
118+
compatibility_converter = 0;
119119
#endif
120120
}
121121
IfcCharacterDecoder::operator std::string() {

src/ifcparse/IfcGuidHelper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
********************************************************************************/
2626

2727
#include <time.h>
28+
#include <stdlib.h>
2829

2930
#include "IfcWrite.h"
3031

src/ifcwrap/Interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/********************************************************************************
1+
/********************************************************************************
22
* *
33
* This file is part of IfcOpenShell. *
44
* *

0 commit comments

Comments
 (0)