Skip to content

Commit b1f6c77

Browse files
author
Jan Wilmans
committed
solved a couple of more warnings
1 parent dff669d commit b1f6c77

File tree

6 files changed

+14
-17
lines changed

6 files changed

+14
-17
lines changed

application/DebugViewpp/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#define VERSION 1,9,0,55
2-
#define VERSION_STR "1.9.0.55"
1+
#define VERSION 1,9,0,56
2+
#define VERSION_STR "1.9.0.56"

application/DebugViewpp/version.wxi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<?define ProductVersion.Major="1" ?>
44
<?define ProductVersion.Minor="9" ?>
55
<?define ProductVersion.Revision="0" ?>
6-
<?define ProductVersion.Build="55" ?>
7-
<?define ProductVersion="1.9.0.55" ?>
6+
<?define ProductVersion.Build="56" ?>
7+
<?define ProductVersion="1.9.0.56" ?>
88
</Include>

application/GDIGraphicsPOC/Logview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void CLogView::DrawItem(CDCHandle dc, int iItem, unsigned /*iItemState*/)
8888
Win32::ScopedTextColor tcol(dc, txColor);
8989

9090
std::wstring text = wstringbuilder() << iItem + 1 << L" If the logview is rendered correctly then exactly 40 lines will fit";
91-
dc.DrawText(text.c_str(), text.size(), &rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
91+
dc.DrawText(text.c_str(), int(text.size()), &rect, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
9292

9393
if (focused)
9494
dc.DrawFocusRect(&rect);

application/GDIGraphicsPOC/MainFrame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hInstPrev*/, LPSTR /*szCmdLi
2727
TranslateMessage(&msg);
2828
DispatchMessage(&msg);
2929
}
30-
return msg.wParam;
30+
return int(msg.wParam);
3131
}
3232

3333
namespace fusion {
@@ -63,7 +63,7 @@ void CMainFrame::AddTab(const std::wstring name)
6363
GetTabCtrl().SetCurSel(newIndex);
6464
}
6565

66-
LRESULT CMainFrame::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
66+
LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
6767
{
6868
CreateTabWindow(*this, CWindow::rcDefault, CTCS_CLOSEBUTTON | CTCS_DRAGREARRANGE);
6969
AddTab(L"Tab1");

application/IndexedStorageLib/IndexedStorage.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ void VectorStorage::shrink_to_fit()
4444
m_storage.shrink_to_fit();
4545
}
4646

47-
SnappyStorage::SnappyStorage() :
48-
m_writeBlockIndex(0),
49-
m_readBlockIndex(-1)
50-
{
51-
}
52-
5347
bool SnappyStorage::Empty() const
5448
{
5549
return m_storage.empty();
@@ -62,7 +56,7 @@ void SnappyStorage::Clear()
6256

6357
m_readList.clear();
6458
m_readList.shrink_to_fit();
65-
m_readBlockIndex = -1;
59+
m_readBlockIndex = UNSET_VALUE;
6660

6761
m_writeList.clear();
6862
m_writeList.shrink_to_fit();

application/include/IndexedStorageLib/IndexedStorage.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77

88
#include <vector>
99
#include <string>
10+
#include <limits>
1011

1112
#pragma comment(lib, "IndexedStorageLib.lib")
1213

1314
namespace fusion {
1415
namespace indexedstorage {
1516

17+
inline constexpr size_t UNSET_VALUE = std::numeric_limits<size_t>::max();
18+
1619
class VectorStorage
1720
{
1821
public:
@@ -30,7 +33,7 @@ class VectorStorage
3033
class SnappyStorage
3134
{
3235
public:
33-
SnappyStorage();
36+
SnappyStorage() = default;
3437

3538
[[nodiscard]] bool Empty() const;
3639
void Clear();
@@ -47,8 +50,8 @@ class SnappyStorage
4750
static size_t GetRelativeIndex(size_t index);
4851
std::string GetString(size_t index);
4952

50-
size_t m_writeBlockIndex;
51-
size_t m_readBlockIndex;
53+
size_t m_writeBlockIndex = 0;
54+
size_t m_readBlockIndex = UNSET_VALUE;
5255
std::vector<std::string> m_readList;
5356
std::vector<std::string> m_writeList;
5457
std::vector<std::string> m_storage;

0 commit comments

Comments
 (0)