Автор: Griefin
Дата сообщения: 11.04.2006 10:00
Недавно собирал для себя и нашел несколько небольших ошибок:
diff -u -r WinDjView-0.4.1/DjVuView.cpp WinDjView-current/DjVuView.cpp
--- WinDjView-0.4.1/DjVuView.cpp 2006-02-25 17:49:58.000000000 +0300
+++ WinDjView-current/DjVuView.cpp 2006-03-12 18:27:19.859375000 +0300
@@ -4244,7 +4244,7 @@
strURL = strURL.substr(0, nPos);
}
- CString strPathName = (const char*)strURL;
+ CString strPathName = (CString)strURL;
TCHAR szDrive[_MAX_DRIVE + 1] = {0};
TCHAR szDir[_MAX_DIR + 1] = {0};
TCHAR szExt[_MAX_EXT + 1] = {0};
diff -u -r WinDjView-0.4.1/MyToolBar.cpp WinDjView-current/MyToolBar.cpp
--- WinDjView-0.4.1/MyToolBar.cpp 2006-02-10 21:13:58.000000000 +0300
+++ WinDjView-current/MyToolBar.cpp 2006-03-12 17:31:03.312500000 +0300
@@ -130,7 +130,7 @@
rctBk.top = rect.top;
rctBk.bottom = rect.bottom;
- HTHEME hTheme;
+ HTHEME hTheme = NULL;
if (XPIsAppThemed() && XPIsThemeActive())
hTheme = XPOpenThemeData(m_hWnd, L"TOOLBAR");
diff -u -r WinDjView-0.4.1/ProgressDlg.cpp WinDjView-current/ProgressDlg.cpp
--- WinDjView-0.4.1/ProgressDlg.cpp 2006-01-18 17:55:56.000000000 +0300
+++ WinDjView-current/ProgressDlg.cpp 2006-03-12 13:41:40.375000000 +0300
@@ -83,8 +83,8 @@
return (InterlockedCompareExchange(&m_nCancelled, 1, 1) == 1);
#else
long nCancelled = 1;
- return (InterlockedCompareExchange((void**)&m_nCancelled,
- (void*)nCancelled, (void*)nCancelled) == (void*)nCancelled);
+ return (InterlockedCompareExchange(&m_nCancelled,
+ nCancelled, nCancelled) == nCancelled);
#endif
}
Есть предложение немного повысить приоритет рендеринга:
diff -u -r WinDjView-0.4.1/RenderThread.cpp WinDjView-current/RenderThread.cpp
--- WinDjView-0.4.1/RenderThread.cpp 2006-02-23 23:56:36.000000000 +0300
+++ WinDjView-current/RenderThread.cpp 2006-03-13 21:10:54.375000000 +0300
@@ -42,7 +42,7 @@
DWORD dwThreadId;
m_hThread = ::CreateThread(NULL, 0, RenderThreadProc, this, 0, &dwThreadId);
- ::SetThreadPriority(m_hThread, THREAD_PRIORITY_BELOW_NORMAL);
+ ::SetThreadPriority(m_hThread, THREAD_PRIORITY_ABOVE_NORMAL);
}
При сборке в VS7 с конфигурациями Debug или Debug Unicode появляется куча повторно определенных символов. Т.е. приходится линкеру добавлять опцию /FORCE:MULTIPLE. В Release все нормально.