|
@@ -120,10 +120,10 @@ static std::mutex gLogStreamMutex;
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------------------------------
|
|
// Custom LogStream implementation for the C-API
|
|
// Custom LogStream implementation for the C-API
|
|
-class LogToCallbackRedirector : public LogStream {
|
|
|
|
|
|
+class LogToCallbackRedirector final : public LogStream {
|
|
public:
|
|
public:
|
|
explicit LogToCallbackRedirector(const aiLogStream &s) :
|
|
explicit LogToCallbackRedirector(const aiLogStream &s) :
|
|
- stream(s) {
|
|
|
|
|
|
+ mStream(s) {
|
|
ai_assert(nullptr != s.callback);
|
|
ai_assert(nullptr != s.callback);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -137,7 +137,7 @@ public:
|
|
// might cause strange problems, but the chance is quite low.
|
|
// might cause strange problems, but the chance is quite low.
|
|
|
|
|
|
PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(),
|
|
PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(),
|
|
- gPredefinedStreams.end(), (Assimp::LogStream *)stream.user);
|
|
|
|
|
|
+ gPredefinedStreams.end(), (Assimp::LogStream *)mStream.user);
|
|
|
|
|
|
if (it != gPredefinedStreams.end()) {
|
|
if (it != gPredefinedStreams.end()) {
|
|
delete *it;
|
|
delete *it;
|
|
@@ -147,11 +147,11 @@ public:
|
|
|
|
|
|
/** @copydoc LogStream::write */
|
|
/** @copydoc LogStream::write */
|
|
void write(const char *message) {
|
|
void write(const char *message) {
|
|
- stream.callback(message, stream.user);
|
|
|
|
|
|
+ mStream.callback(message, mStream.user);
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
- aiLogStream stream;
|
|
|
|
|
|
+ const aiLogStream &mStream;
|
|
};
|
|
};
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------------------------------
|