This avoids ifdefs at each place the macro is used.
Showing the changes to codec/encoder/core/src/utils.cpp (1 of 5 files). Show all
Unified · Split
| @@ -332,16 +332,11 @@ void WelsReopenTraceFile (void* pCtx, str_t* pCurPath) { · 331 unmodified lines | ||
| 332 | 332 | STRNCPY (strTraceFile, MAX_FNAME_LEN, pCurPath, len); // confirmed_safe_unsafe_usage |
| 333 | 333 | #ifdef __GNUC__ |
| 334 | 334 | STRCAT (strTraceFile, MAX_FNAME_LEN - len, "/wels_encoder_trace.txt"); // confirmed_safe_unsafe_usage |
| 335 | − pEncCtx->pFileLog = FOPEN (strTraceFile, "wt+"); // confirmed_safe_unsafe_usage | |
| 336 | 335 | #elif _WIN32 |
| 337 | 336 | STRCAT (strTraceFile, MAX_FNAME_LEN - len, "\\wels_encoder_trace.txt"); // confirmed_safe_unsafe_usage |
| 338 | −#if _MSC_VER >= 1500 | |
| 339 | − FOPEN (&pEncCtx->pFileLog, strTraceFile, "wt+"); // confirmed_safe_unsafe_usage | |
| 340 | −#else | |
| 341 | − pEncCtx->pFileLog = FOPEN (strTraceFile, "wt+"); // confirmed_safe_unsafe_usage | |
| 342 | −#endif//_MSC_VER>=1500 | |
| 343 | 337 | #else |
| 344 | 338 | #endif//__GNUC__ |
| 339 | + pEncCtx->pFileLog = WelsFopen (strTraceFile, "wt+"); // confirmed_safe_unsafe_usage | |
| 345 | 340 | } |
| 346 | 341 | #endif//ENABLE_TRACE_FILE |
| 347 | 342 | } |