@@ -63,6 +63,13 @@ THE SOFTWARE.
63
63
64
64
namespace tinyobj {
65
65
66
+ // TODO(syoyo): Better C++11 detection for older compiler
67
+ #if __cplusplus > 199711L
68
+ #define TINYOBJ_OVERRIDE override
69
+ #else
70
+ #define TINYOBJ_OVERRIDE
71
+ #endif
72
+
66
73
#ifdef __clang__
67
74
#pragma clang diagnostic push
68
75
#if __has_warning("-Wzero-as-null-pointer-constant")
@@ -444,7 +451,7 @@ class MaterialFileReader : public MaterialReader {
444
451
virtual bool operator ()(const std::string &matId,
445
452
std::vector<material_t > *materials,
446
453
std::map<std::string, int > *matMap, std::string *warn,
447
- std::string *err) override ;
454
+ std::string *err) TINYOBJ_OVERRIDE ;
448
455
449
456
private:
450
457
std::string m_mtlBaseDir;
@@ -461,7 +468,7 @@ class MaterialStreamReader : public MaterialReader {
461
468
virtual bool operator ()(const std::string &matId,
462
469
std::vector<material_t > *materials,
463
470
std::map<std::string, int > *matMap, std::string *warn,
464
- std::string *err) override ;
471
+ std::string *err) TINYOBJ_OVERRIDE ;
465
472
466
473
private:
467
474
std::istream &m_inStream;
0 commit comments