Skip to content

Commit

Permalink
solved a couple of more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Wilmans committed Jun 20, 2024
1 parent dff669d commit b1f6c77
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions application/DebugViewpp/version.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define VERSION 1,9,0,55
#define VERSION_STR "1.9.0.55"
#define VERSION 1,9,0,56
#define VERSION_STR "1.9.0.56"
4 changes: 2 additions & 2 deletions application/DebugViewpp/version.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<?define ProductVersion.Major="1" ?>
<?define ProductVersion.Minor="9" ?>
<?define ProductVersion.Revision="0" ?>
<?define ProductVersion.Build="55" ?>
<?define ProductVersion="1.9.0.55" ?>
<?define ProductVersion.Build="56" ?>
<?define ProductVersion="1.9.0.56" ?>
</Include>
2 changes: 1 addition & 1 deletion application/GDIGraphicsPOC/Logview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void CLogView::DrawItem(CDCHandle dc, int iItem, unsigned /*iItemState*/)
Win32::ScopedTextColor tcol(dc, txColor);

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

if (focused)
dc.DrawFocusRect(&rect);
Expand Down
4 changes: 2 additions & 2 deletions application/GDIGraphicsPOC/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int WINAPI WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hInstPrev*/, LPSTR /*szCmdLi
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
return int(msg.wParam);
}

namespace fusion {
Expand Down Expand Up @@ -63,7 +63,7 @@ void CMainFrame::AddTab(const std::wstring name)
GetTabCtrl().SetCurSel(newIndex);
}

LRESULT CMainFrame::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
CreateTabWindow(*this, CWindow::rcDefault, CTCS_CLOSEBUTTON | CTCS_DRAGREARRANGE);
AddTab(L"Tab1");
Expand Down
8 changes: 1 addition & 7 deletions application/IndexedStorageLib/IndexedStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ void VectorStorage::shrink_to_fit()
m_storage.shrink_to_fit();
}

SnappyStorage::SnappyStorage() :
m_writeBlockIndex(0),
m_readBlockIndex(-1)
{
}

bool SnappyStorage::Empty() const
{
return m_storage.empty();
Expand All @@ -62,7 +56,7 @@ void SnappyStorage::Clear()

m_readList.clear();
m_readList.shrink_to_fit();
m_readBlockIndex = -1;
m_readBlockIndex = UNSET_VALUE;

m_writeList.clear();
m_writeList.shrink_to_fit();
Expand Down
9 changes: 6 additions & 3 deletions application/include/IndexedStorageLib/IndexedStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@

#include <vector>
#include <string>
#include <limits>

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

namespace fusion {
namespace indexedstorage {

inline constexpr size_t UNSET_VALUE = std::numeric_limits<size_t>::max();

class VectorStorage
{
public:
Expand All @@ -30,7 +33,7 @@ class VectorStorage
class SnappyStorage
{
public:
SnappyStorage();
SnappyStorage() = default;

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

size_t m_writeBlockIndex;
size_t m_readBlockIndex;
size_t m_writeBlockIndex = 0;
size_t m_readBlockIndex = UNSET_VALUE;
std::vector<std::string> m_readList;
std::vector<std::string> m_writeList;
std::vector<std::string> m_storage;
Expand Down

0 comments on commit b1f6c77

Please sign in to comment.