Import: Simplify handling of Resource_FormatType

The type Resource_FormatType already exists since 2015. So, its usage doesn't require pre-processor macros everywhere.
This commit is contained in:
wmayer
2024-06-18 15:54:56 +02:00
committed by Chris Hennes
parent d49303a5dc
commit 06b464a9b0
6 changed files with 53 additions and 71 deletions

View File

@@ -157,16 +157,9 @@ private:
hApp->NewDocument(TCollection_ExtendedString("MDTV-CAF"), hDoc);
if (file.hasExtension({"stp", "step"})) {
#if OCC_VERSION_HEX >= 0x070800
Resource_FormatType cp = Resource_FormatType_UTF8;
#endif
try {
Import::ReaderStep reader(file);
#if OCC_VERSION_HEX < 0x070800
reader.read(hDoc);
#else
reader.read(hDoc, cp);
#endif
}
catch (OSD_Exception& e) {
Base::Console().Error("%s\n", e.GetMessageString());