4.43 beta

This commit is contained in:
Igor Pavlov
2006-09-15 00:00:00 +00:00
committed by Kornel Lesiński
parent 0ec42ff829
commit 804edc5756
391 changed files with 9725 additions and 3168 deletions

View File

@@ -235,7 +235,7 @@ bool CBenchmarkDialog::OnInit()
TCHAR s[40];
ConvertUInt64ToString((dictionary >> 20), s);
lstrcat(s, kMB);
int index = m_Dictionary.AddString(s);
int index = (int)m_Dictionary.AddString(s);
m_Dictionary.SetItemData(index, dictionary);
}
m_Dictionary.SetCurSel(0);
@@ -413,7 +413,7 @@ void CBenchmarkDialog::PrintResults(
PrintRating(rating, ratingID);
}
bool CBenchmarkDialog::OnTimer(WPARAM timerID, LPARAM callback)
bool CBenchmarkDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
{
PrintTime();
NWindows::NSynchronization::CCriticalSectionLock lock(_syncInfo.CS);
@@ -629,7 +629,7 @@ struct CDecoderProgressInfo:
};
STDMETHODIMP CDecoderProgressInfo::SetRatioInfo(
const UInt64 *inSize, const UInt64 *outSize)
const UInt64 * /* inSize */, const UInt64 * /* outSize */)
{
NSynchronization::CCriticalSectionLock lock(SyncInfo->CS);
if (SyncInfo->Changed)
@@ -647,16 +647,18 @@ struct CThreadBenchmark:
NDLL::CLibrary Library;
CMyComPtr<ICompressCoder> Encoder;
CMyComPtr<ICompressCoder> Decoder;
DWORD Process();
HRESULT Process();
HRESULT Result;
static DWORD WINAPI MyThreadFunction(void *param)
{
return ((CThreadBenchmark *)param)->Process();
((CThreadBenchmark *)param)->Result = ((CThreadBenchmark *)param)->Process();
return 0;
}
MY_UNKNOWN_IMP
STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
};
DWORD CThreadBenchmark::Process()
HRESULT CThreadBenchmark::Process()
{
try
{
@@ -685,7 +687,7 @@ DWORD CThreadBenchmark::Process()
CMyComPtr<ICompressProgressInfo> decoderProgress = decoderProgressInfoSpec;
decoderProgressInfoSpec->SyncInfo = SyncInfo;
while(true)
for (;;)
{
if (SyncInfo->WasStopped())
return 0;
@@ -760,7 +762,7 @@ DWORD CThreadBenchmark::Process()
// this code is for reducing time of memory allocationg
inStreamSpec->Init(randomGenerator.Buffer, MyMin((UInt32)1, randomGenerator.BufferSize));
outStreamSpec->Init();
HRESULT result = Encoder->Code(inStream, outStream, 0, 0, NULL);
/* HRESULT result = */ Encoder->Code(inStream, outStream, 0, 0, NULL);
}
inStreamSpec->Init(randomGenerator.Buffer, randomGenerator.BufferSize);
@@ -815,7 +817,7 @@ DWORD CThreadBenchmark::Process()
if (compressSetDecoderProperties)
{
RINOK(compressSetDecoderProperties->SetDecoderProperties2(
propStreamSpec->GetBuffer(), propStreamSpec->GetSize()));
propStreamSpec->GetBuffer(), (UInt32)propStreamSpec->GetSize()));
}
UInt64 outSize = kBufferSize;

View File

@@ -30,7 +30,7 @@ bool CLangPage::OnInit()
s += L" (";
s += NWindows::MyLoadStringW(IDS_LANG_NATIVE);
s += L")";
int index = _langCombo.AddString(s);
int index = (int)_langCombo.AddString(s);
_langCombo.SetItemData(index, _paths.Size());
_paths.Add(L"-");
_langCombo.SetCurSel(0);
@@ -55,7 +55,7 @@ bool CLangPage::OnInit()
name += L")";
}
}
index = _langCombo.AddString(name);
index = (int)_langCombo.AddString(name);
_langCombo.SetItemData(index, _paths.Size());
_paths.Add(lang.ShortName);
if (g_LangID.CompareNoCase(lang.ShortName) == 0)
@@ -67,7 +67,7 @@ bool CLangPage::OnInit()
LONG CLangPage::OnApply()
{
int selectedIndex = _langCombo.GetCurSel();
int pathIndex = _langCombo.GetItemData(selectedIndex);
int pathIndex = (int)_langCombo.GetItemData(selectedIndex);
SaveRegLang(_paths[pathIndex]);
ReloadLang();
_langWasChanged = true;

View File

@@ -45,7 +45,7 @@ bool CListViewDialog::OnInit()
return CModalDialog::OnInit();
}
bool CListViewDialog::OnNotify(UINT controlID, LPNMHDR header)
bool CListViewDialog::OnNotify(UINT /* controlID */, LPNMHDR header)
{
if (header->hwndFrom != _listView)
return false;
@@ -63,7 +63,7 @@ bool CListViewDialog::OnNotify(UINT controlID, LPNMHDR header)
int focusedIndex = _listView.GetFocusedItem();
if (focusedIndex < 0)
focusedIndex = 0;
while(true)
for (;;)
{
int index = _listView.GetNextSelectedItem(-1);
if (index < 0)

View File

@@ -82,7 +82,7 @@ void CProgressDialog::SetPos(UINT64 pos)
}
}
bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
{
if (ProgressSynch.GetPaused())
return true;

View File

@@ -31,7 +31,7 @@ static CIDLangPair kIDLangPairs[] =
HRESULT CProgressSynch::SetPosAndCheckPaused(UInt64 completed)
{
while(true)
for (;;)
{
if(GetStopped())
return E_ABORT;
@@ -114,7 +114,7 @@ void CProgressDialog::OnCancel()
static void ConvertSizeToString(UInt64 value, wchar_t *s)
{
const wchar_t *kModif = L" KMGTP";
for (int i = 0; true; i++)
for (int i = 0; ; i++)
if (i == 5 || value < (UInt64(10000) << (i * 10)))
{
ConvertUInt64ToString(value >> (i * 10), s);
@@ -163,7 +163,7 @@ static void GetTimeString(UInt64 timeValue, TCHAR *s)
UInt32(timeValue % 60));
}
bool CProgressDialog::OnTimer(WPARAM timerID, LPARAM callback)
bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */)
{
if (ProgressSynch.GetPaused())
return true;

View File

@@ -351,7 +351,7 @@ void CSystemPage::UpdateDatabase()
LPARAM param;
if (!_listViewExt.GetItemParam(i, param))
return;
CExtInfoBig &extInfo = _extDatabase.ExtBigItems[param];
CExtInfoBig &extInfo = _extDatabase.ExtBigItems[(int)param];
extInfo.Associated = _listViewExt.GetCheckState(i);
}
@@ -376,7 +376,7 @@ int CSystemPage::GetSelectedExtIndex()
LPARAM param;
if (!_listViewExt.GetItemParam(selectedIndex, param))
return -1;
return param;
return (int)param;
}