From 04aea46757bad0a2684406e127a0ef37b627c1c1 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 20 Jul 2012 12:52:55 +0000 Subject: [PATCH] Remove BOM in Interface.h Add include for rand() and srand() in IfcGuidHelper.cpp Remove dependency on nullptr for older compilers --- src/ifcparse/IfcCharacterDecoder.cpp | 12 ++++++------ src/ifcparse/IfcGuidHelper.cpp | 1 + src/ifcwrap/Interface.h | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ifcparse/IfcCharacterDecoder.cpp b/src/ifcparse/IfcCharacterDecoder.cpp index 7b2e4a0cb9..5100c084ab 100644 --- a/src/ifcparse/IfcCharacterDecoder.cpp +++ b/src/ifcparse/IfcCharacterDecoder.cpp @@ -92,11 +92,11 @@ IfcCharacterDecoder::IfcCharacterDecoder(IfcParse::File* f) { #ifdef HAVE_ICU if (destination) ucnv_close(destination); if (compatibility_converter) ucnv_close(compatibility_converter); - destination = nullptr; - compatibility_converter = nullptr; + destination = 0; + compatibility_converter = 0; if (mode == DEFAULT) { - destination = ucnv_open(nullptr, &status); + destination = ucnv_open(0, &status); } else if (mode == UTF8) { destination = ucnv_open("utf-8", &status); } else if (mode == LATIN) { @@ -113,9 +113,9 @@ IfcCharacterDecoder::~IfcCharacterDecoder() { if ( destination ) ucnv_close(destination); if ( converter ) ucnv_close(converter); if ( compatibility_converter ) ucnv_close(compatibility_converter); - destination = nullptr; - converter = nullptr; - compatibility_converter = nullptr; + destination = 0; + converter = 0; + compatibility_converter = 0; #endif } IfcCharacterDecoder::operator std::string() { diff --git a/src/ifcparse/IfcGuidHelper.cpp b/src/ifcparse/IfcGuidHelper.cpp index 206df8fba4..7ed421ac54 100644 --- a/src/ifcparse/IfcGuidHelper.cpp +++ b/src/ifcparse/IfcGuidHelper.cpp @@ -25,6 +25,7 @@ ********************************************************************************/ #include +#include #include "IfcWrite.h" diff --git a/src/ifcwrap/Interface.h b/src/ifcwrap/Interface.h index 0afe32aa67..f75512371a 100644 --- a/src/ifcwrap/Interface.h +++ b/src/ifcwrap/Interface.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** * * * This file is part of IfcOpenShell. * * *