• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29334 (tree)
Time2022-01-08 17:12:37
Authorstefankueng

Log Message

code cleanup

Change Summary

Incremental Difference

--- trunk/src/SVN/SVNAuthData.cpp (revision 29333)
+++ trunk/src/SVN/SVNAuthData.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2013-2015, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2013-2015, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -60,14 +60,14 @@
6060 svn_pool_destroy(m_pool); // free the allocated memory
6161 }
6262
63-static const WCHAR description[] = L"auth_svn.simple.wincrypt";
63+static constexpr WCHAR description[] = L"auth_svn.simple.wincrypt";
6464 const svn_string_t *SVNAuthData::decrypt_data(const svn_string_t *crypted, apr_pool_t *pool)
6565 {
6666 crypted = svn_base64_decode_string(crypted, pool);
6767
68- DATA_BLOB blobin;
69- DATA_BLOB blobout;
70- LPWSTR descr;
68+ DATA_BLOB blobin{};
69+ DATA_BLOB blobout{};
70+ LPWSTR descr{};
7171 const svn_string_t *orig = nullptr;
7272
7373 blobin.cbData = static_cast<DWORD>(crypted->len);
@@ -84,8 +84,8 @@
8484
8585 const svn_string_t *SVNAuthData::encrypt_data(const svn_string_t *orig, apr_pool_t *pool)
8686 {
87- DATA_BLOB blobIn;
88- DATA_BLOB blobOut;
87+ DATA_BLOB blobIn{};
88+ DATA_BLOB blobOut{};
8989 const svn_string_t *crypted = nullptr;
9090
9191 blobIn.cbData = static_cast<DWORD>(orig->len);
@@ -234,7 +234,7 @@
234234 }
235235 }
236236
237- for (auto it : delList)
237+ for (auto& it : delList)
238238 {
239239 if ((s1.Compare(std::get<0>(it)) == 0) &&
240240 (s2.Compare(std::get<1>(it)) == 0))
--- trunk/src/SVN/SVNConflictInfo.cpp (revision 29333)
+++ trunk/src/SVN/SVNConflictInfo.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2016-2018, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2016-2018, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -436,8 +436,8 @@
436436 label = svn_client_conflict_option_get_label(opt, scratchPool);
437437 description = svn_client_conflict_option_get_description(opt, scratchPool);
438438
439- result.push_back(std::unique_ptr<SVNConflictOption>(new SVNConflictOption(opt, id,
440- CUnicodeUtils::GetUnicode(label), CUnicodeUtils::GetUnicode(description), -1, j)));
439+ result.push_back(std::make_unique<SVNConflictOption>(opt, id,
440+ CUnicodeUtils::GetUnicode(label), CUnicodeUtils::GetUnicode(description), -1, j));
441441 bResultAdded = true;
442442 }
443443 }
--- trunk/src/SVN/SVNDiff.cpp (revision 29333)
+++ trunk/src/SVN/SVNDiff.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2016, 2018, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2016, 2018, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -343,7 +343,7 @@
343343 return false;
344344 }
345345
346-bool SVNDiff::ShowCompare(const CTSVNPath& url1, const SVNRev& rev1, const CTSVNPath& url2, const SVNRev& rev2, SVNRev peg, bool ignoreProps, bool prettyPrint, const CString& options, bool ignoreAncestry /*= false*/, bool blame /*= false*/, svn_node_kind_t nodeKind /*= svn_node_unknown*/)
346+bool SVNDiff::ShowCompare(const CTSVNPath& url1, const SVNRev& rev1, const CTSVNPath& url2, const SVNRev& rev2, SVNRev peg, bool ignoreProps, bool prettyPrint, const CString& options, bool ignoreAncestry /*= false*/, bool blame /*= false*/, svn_node_kind_t nodeKind /*= svn_node_unknown*/) const
347347 {
348348 CTSVNPath tempFile;
349349 CString mimeType;
@@ -704,7 +704,7 @@
704704 SVNProperties propsWc(filePath, rev1, false, false);
705705 SVNProperties propsBase(filePath, rev2, false, false);
706706
707-#define MAX_PATH_LENGTH 80
707+constexpr auto MAX_PATH_LENGTH = 80;
708708 WCHAR pathBuf1[MAX_PATH] = {0};
709709 if (filePath.GetWinPathString().GetLength() >= MAX_PATH)
710710 {
--- trunk/src/SVN/SVNDiff.h (revision 29333)
+++ trunk/src/SVN/SVNDiff.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2006, 2008-2011, 2013-2014, 2016, 2018, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2006, 2008-2011, 2013-2014, 2016, 2018, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -90,7 +90,7 @@
9090 * In case \a url1 is an URL and not a local path, then the file diff dialog
9191 * is used to show the diff.
9292 */
93- bool ShowCompare(const CTSVNPath& url1, const SVNRev& rev1, const CTSVNPath& url2, const SVNRev& rev2, SVNRev peg, bool ignoreProps, bool prettyPrint, const CString& options, bool ignoreAncestry = false, bool blame = false, svn_node_kind_t nodeKind = svn_node_unknown);
93+ bool ShowCompare(const CTSVNPath& url1, const SVNRev& rev1, const CTSVNPath& url2, const SVNRev& rev2, SVNRev peg, bool ignoreProps, bool prettyPrint, const CString& options, bool ignoreAncestry = false, bool blame = false, svn_node_kind_t nodeKind = svn_node_unknown) const;
9494
9595 bool DiffProps(const CTSVNPath& filePath, const SVNRev& rev1, const SVNRev& rev2, svn_revnum_t& baseRev) const;
9696
--- trunk/src/SVN/SVNExternals.cpp (revision 29333)
+++ trunk/src/SVN/SVNExternals.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2010-2015, 2019, 2021 - TortoiseSVN
3+// Copyright (C) 2010-2015, 2019, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -488,7 +488,7 @@
488488 return url;
489489 }
490490
491-apr_hash_t *SVNExternals::GetHash(bool bLocal, apr_pool_t *pool)
491+apr_hash_t *SVNExternals::GetHash(bool bLocal, apr_pool_t *pool) const
492492 {
493493 apr_hash_t *externalsToPin = nullptr;
494494 if (!empty())
--- trunk/src/SVN/SVNExternals.h (revision 29333)
+++ trunk/src/SVN/SVNExternals.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2010, 2012-2013, 2015, 2021 - TortoiseSVN
3+// Copyright (C) 2010, 2012-2013, 2015, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -89,7 +89,7 @@
8989 CString GetLastErrorString() const { return m_sError; }
9090
9191 /// return a hash with all the externals that are used for tagging to be used in svn_client_copy7
92- apr_hash_t* GetHash(bool bLocal, apr_pool_t* pool);
92+ apr_hash_t* GetHash(bool bLocal, apr_pool_t* pool) const;
9393
9494 /// returns true if any of the externals are marked to be tagged
9595 bool NeedsTagging() const;
--- trunk/src/SVN/SVNStatus.cpp (revision 29333)
+++ trunk/src/SVN/SVNStatus.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2015, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -102,7 +102,7 @@
102102 svn_error_clear(svn_client_create_context2(&ctx, SVNConfig::Instance().GetConfig(pool), pool));
103103
104104 svn_revnum_t youngest = SVN_INVALID_REVNUM;
105- svn_opt_revision_t rev;
105+ svn_opt_revision_t rev{};
106106 rev.kind = svn_opt_revision_unspecified;
107107 statusKind = svn_wc_status_none;
108108
@@ -199,9 +199,9 @@
199199 statusHash = apr_hash_make(m_pool);
200200 extHash = apr_hash_make(m_pool);
201201 svn_revnum_t youngest = SVN_INVALID_REVNUM;
202- svn_opt_revision_t rev;
202+ svn_opt_revision_t rev{};
203203 rev.kind = svn_opt_revision_unspecified;
204- struct HashbatonT hashBaton;
204+ HashbatonT hashBaton{};
205205 hashBaton.hash = statusHash;
206206 hashBaton.extHash = extHash;
207207 hashBaton.pThis = this;
@@ -264,9 +264,9 @@
264264 m_statusHash = apr_hash_make(m_pool);
265265 m_externalHash = apr_hash_make(m_pool);
266266 headrev = SVN_INVALID_REVNUM;
267- svn_opt_revision_t rev;
267+ svn_opt_revision_t rev{};
268268 rev.kind = svn_opt_revision_unspecified;
269- struct HashbatonT hashBaton;
269+ HashbatonT hashBaton{};
270270 hashBaton.hash = m_statusHash;
271271 hashBaton.extHash = m_externalHash;
272272 hashBaton.pThis = this;
@@ -362,7 +362,7 @@
362362
363363 SVNPool localPool(m_pool);
364364 apr_hash_index_t* hi = nullptr;
365- const char* key;
365+ const char* key = nullptr;
366366 for (hi = apr_hash_first(localPool, m_externalHash); hi; hi = apr_hash_next(hi))
367367 {
368368 apr_hash_this(hi, reinterpret_cast<const void**>(&key), nullptr, nullptr);
@@ -382,7 +382,7 @@
382382
383383 SVNPool localPool(m_pool);
384384 apr_hash_index_t* hi = nullptr;
385- const char* key;
385+ const char* key = nullptr;
386386 for (hi = apr_hash_first(localPool, m_externalHash); hi; hi = apr_hash_next(hi))
387387 {
388388 apr_hash_this(hi, reinterpret_cast<const void**>(&key), nullptr, nullptr);
--- trunk/src/SVN/SVNStatusListCtrl.cpp (revision 29333)
+++ trunk/src/SVN/SVNStatusListCtrl.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2018, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2003-2018, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -1634,7 +1634,7 @@
16341634
16351635 CString CSVNStatusListCtrl::GetCellText(int listIndex, int column)
16361636 {
1637-#define UNKNOWN_DATA L"???"
1637+constexpr auto UNKNOWN_DATA = L"???";
16381638
16391639 static const CString pOnly(MAKEINTRESOURCE(IDS_STATUSLIST_PROPONLY));
16401640 static const CString treeConflict(MAKEINTRESOURCE(IDS_STATUSLIST_TREECONFLICT));
@@ -2473,7 +2473,7 @@
24732473 return !bRefetchStatus;
24742474 }
24752475
2476-void CSVNStatusListCtrl::GetMinMaxRevisions(svn_revnum_t& rMin, svn_revnum_t& rMax, bool bShownOnly, bool bCheckedOnly)
2476+void CSVNStatusListCtrl::GetMinMaxRevisions(svn_revnum_t& rMin, svn_revnum_t& rMax, bool bShownOnly, bool bCheckedOnly) const
24772477 {
24782478 CAutoReadLock locker(m_guard);
24792479 rMin = LONG_MAX;
@@ -2761,7 +2761,7 @@
27612761 auto buf = std::make_unique<wchar_t[]>(len + 2);
27622762 wcscpy_s(buf.get(), len + 2, filelist);
27632763 CStringUtils::PipesToNulls(buf.get(), len);
2764- SHFILEOPSTRUCT fileOp;
2764+ SHFILEOPSTRUCT fileOp{};
27652765 fileOp.hwnd = this->m_hWnd;
27662766 fileOp.wFunc = FO_DELETE;
27672767 fileOp.pFrom = buf.get();
@@ -5571,7 +5571,7 @@
55715571 return true;
55725572 }
55735573
5574-bool CSVNStatusListCtrl::HasPath(const CTSVNPath& path)
5574+bool CSVNStatusListCtrl::HasPath(const CTSVNPath& path) const
55755575 {
55765576 CAutoReadLock locker(m_guard);
55775577 for (size_t i = 0; i < m_arStatusArray.size(); i++)
--- trunk/src/SVN/SVNStatusListCtrl.h (revision 29333)
+++ trunk/src/SVN/SVNStatusListCtrl.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2015, 2017-2021 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2017-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -753,7 +753,7 @@
753753 * \remark Since an item can only be checked if it is visible/shown in the list control
754754 * bShownOnly is automatically set to true if bCheckedOnly is true
755755 */
756- void GetMinMaxRevisions(svn_revnum_t& rMin, svn_revnum_t& rMax, bool bShownOnly, bool bCheckedOnly);
756+ void GetMinMaxRevisions(svn_revnum_t& rMin, svn_revnum_t& rMax, bool bShownOnly, bool bCheckedOnly) const;
757757
758758 /**
759759 * Returns the parent directory of all entries in the control.
@@ -821,7 +821,7 @@
821821 /**
822822 * Checks if the path already exists in the list.
823823 */
824- bool HasPath(const CTSVNPath& path);
824+ bool HasPath(const CTSVNPath& path) const;
825825 /**
826826 * Checks if the path is shown/visible in the list control.
827827 */
--- trunk/src/TortoiseMerge/BaseView.cpp (revision 29333)
+++ trunk/src/TortoiseMerge/BaseView.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseMerge - a Diff/Patch program
22
3-// Copyright (C) 2003-2021 - TortoiseSVN
3+// Copyright (C) 2003-2022 - TortoiseSVN
44 // Copyright (C) 2019 - TortoiseGit
55
66 // This program is free software; you can redistribute it and/or
@@ -1616,7 +1616,7 @@
16161616 return IsStateRemoved(state);
16171617 }
16181618
1619-COLORREF CBaseView::InlineDiffColor(int nLineIndex)
1619+COLORREF CBaseView::InlineDiffColor(int nLineIndex) const
16201620 {
16211621 if (m_bDark)
16221622 return IsLineRemoved(nLineIndex) ? m_inlineRemovedDarkBk : m_inlineAddedDarkBk;
@@ -1623,7 +1623,7 @@
16231623 return IsLineRemoved(nLineIndex) ? m_inlineRemovedBk : m_inlineAddedBk;
16241624 }
16251625
1626-COLORREF CBaseView::InlineViewLineDiffColor(int nViewLine)
1626+COLORREF CBaseView::InlineViewLineDiffColor(int nViewLine) const
16271627 {
16281628 if (m_bDark)
16291629 return IsViewLineRemoved(nViewLine) ? m_inlineRemovedDarkBk : m_inlineAddedDarkBk;
--- trunk/src/TortoiseMerge/BaseView.h (revision 29333)
+++ trunk/src/TortoiseMerge/BaseView.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseMerge - a Diff/Patch program
22
3-// Copyright (C) 2003-2015, 2017-2021 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2017-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -446,8 +446,8 @@
446446 CFont* GetFont(BOOL bItalic = FALSE, BOOL bBold = FALSE);
447447 int GetLineFromPoint(CPoint point);
448448 int GetMarginWidth();
449- COLORREF InlineDiffColor(int nLineIndex);
450- COLORREF InlineViewLineDiffColor(int nLineIndex);
449+ COLORREF InlineDiffColor(int nLineIndex) const;
450+ COLORREF InlineViewLineDiffColor(int nLineIndex) const;
451451 bool GetInlineDiffPositions(int lineIndex, std::vector<InlineDiffPos>& positions);
452452 void CheckOtherView();
453453 static void GetWhitespaceBlock(CViewData* viewData, int nLineIndex, int& nStartBlock, int& nEndBlock);
--- trunk/src/TortoiseProc/Commands/HelpCommand.h (revision 29333)
+++ trunk/src/TortoiseProc/Commands/HelpCommand.h (revision 29334)
@@ -18,7 +18,6 @@
1818 //
1919 #pragma once
2020 #include "Command.h"
21-#include "TortoiseProc.h"
2221 #include "../AppUtils.h"
2322
2423 /**
--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29333)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2021 - TortoiseSVN
3+// Copyright (C) 2003-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -3905,8 +3905,8 @@
39053905 }
39063906 }
39073907
3908-CRect CLogDlg::DrawListColumnBackground(CListCtrl& listCtrl, NMLVCUSTOMDRAW* pLVCD,
3909- PLOGENTRYDATA pLogEntry)
3908+CRect CLogDlg::DrawListColumnBackground(const CListCtrl& listCtrl, const NMLVCUSTOMDRAW* pLVCD,
3909+ PLOGENTRYDATA pLogEntry) const
39103910 {
39113911 // Get the selected state of the
39123912 // item being drawn.
@@ -8568,7 +8568,7 @@
85688568 return nullptr;
85698569 }
85708570
8571-HTREEITEM CLogDlg::FindMonitorParent(const CString& parentTreePath)
8571+HTREEITEM CLogDlg::FindMonitorParent(const CString& parentTreePath) const
85728572 {
85738573 if (parentTreePath.IsEmpty())
85748574 return TVI_ROOT;
@@ -8603,7 +8603,7 @@
86038603 return path;
86048604 }
86058605
8606-HTREEITEM CLogDlg::FindMonitorItem(const CString& wcpathorurl)
8606+HTREEITEM CLogDlg::FindMonitorItem(const CString& wcpathorurl) const
86078607 {
86088608 HTREEITEM hRetItem = nullptr;
86098609 RecurseMonitorTree(TVI_ROOT, [&](HTREEITEM hItem) -> bool {
@@ -10168,6 +10168,7 @@
1016810168 g_snarlGlobalMsg = 0;
1016910169 }
1017010170
10171+// ReSharper disable once CppMemberFunctionMayBeConst
1017110172 void CLogDlg::OnMonitorUpdateAll()
1017210173 {
1017310174 // find all working copy paths, write them to a temp file
--- trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 29333)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2018, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2003-2018, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -323,7 +323,7 @@
323323 void AdjustDateFilterVisibility();
324324 void ReportNoUrlOfFile(const CString& filepath) const;
325325 void ReportNoUrlOfFile(LPCWSTR filepath) const;
326- CRect DrawListColumnBackground(CListCtrl& listCtrl, NMLVCUSTOMDRAW* pLVCD, PLOGENTRYDATA pLogEntry);
326+ CRect DrawListColumnBackground(const CListCtrl& listCtrl, const NMLVCUSTOMDRAW* pLVCD, PLOGENTRYDATA pLogEntry) const;
327327 LRESULT DrawListItemWithMatches(CListCtrl& listCtrl, NMLVCUSTOMDRAW* pLVCD, PLOGENTRYDATA pLogEntry);
328328
329329 // extracted from OnInitDialog()...
@@ -453,8 +453,8 @@
453453 void MonitorEditProject(MonitorItem* pProject, const CString& sParentPath = CString());
454454
455455 HTREEITEM InsertMonitorItem(MonitorItem* pMonitorItem, const CString& sParentPath = CString());
456- HTREEITEM FindMonitorParent(const CString& parentTreePath);
457- HTREEITEM FindMonitorItem(const CString& wcpathorurl);
456+ HTREEITEM FindMonitorParent(const CString& parentTreePath) const;
457+ HTREEITEM FindMonitorItem(const CString& wcpathorurl) const;
458458 HTREEITEM RecurseMonitorTree(HTREEITEM hItem, MonitorItemHandler handler) const;
459459 void SaveMonitorProjects(bool todisk);
460460 void MonitorTimer();
--- trunk/src/TortoiseProc/LogDialog/LogDlgHelper.cpp (revision 29333)
+++ trunk/src/TortoiseProc/LogDialog/LogDlgHelper.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2007, 2009-2016, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2007, 2009-2016, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -310,7 +310,7 @@
310310 HRESULT CMonitorTreeTarget::DragOver(DWORD grfKeyState, POINTL pt, DWORD __RPC_FAR* pdwEffect)
311311 {
312312 wchar_t targetName[MAX_PATH] = {0};
313- TVHITTESTINFO hit;
313+ TVHITTESTINFO hit{};
314314 hit.pt = reinterpret_cast<POINT&>(pt);
315315 ScreenToClient(m_hTargetWnd, &hit.pt);
316316 hit.flags = TVHT_ONITEM;
--- trunk/src/TortoiseProc/LogDialog/StatGraphDlg.cpp (revision 29333)
+++ trunk/src/TortoiseProc/LogDialog/StatGraphDlg.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2018, 2021 - TortoiseSVN
3+// Copyright (C) 2003-2018, 2021-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -632,7 +632,7 @@
632632
633633 unsigned int includedAuthorsCount = m_skipper.GetPos();
634634 // if we only leave out one author, still include him with his name
635- if (includedAuthorsCount + 1 == m_authorNames.size())
635+ if (includedAuthorsCount + 1LL == m_authorNames.size())
636636 ++includedAuthorsCount;
637637
638638 // add the included authors first
--- trunk/src/TortoiseProc/SVNProgressDlg.cpp (revision 29333)
+++ trunk/src/TortoiseProc/SVNProgressDlg.cpp (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2021 - TortoiseSVN
3+// Copyright (C) 2003-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -970,7 +970,7 @@
970970 str.AppendFormat(L":%d", count);
971971 }
972972
973-CString CSVNProgressDlg::BuildInfoString()
973+CString CSVNProgressDlg::BuildInfoString() const
974974 {
975975 CString infoText;
976976 int added = 0;
@@ -1112,7 +1112,7 @@
11121112 }
11131113
11141114 // get the width of the string and add 14 pixels for the column separator and margins
1115-#define SEPANDMARG 14
1115+constexpr auto SEPANDMARG = 14;
11161116 int lineWidth = cx;
11171117 switch (col)
11181118 {
@@ -1843,6 +1843,7 @@
18431843 }
18441844 }
18451845
1846+// ReSharper disable once CppMemberFunctionMayBeConst
18461847 void CSVNProgressDlg::OnNMCustomdrawSvnprogress(NMHDR* pNMHDR, LRESULT* pResult)
18471848 {
18481849 NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>(pNMHDR);
@@ -2477,6 +2478,7 @@
24772478 theApp.DoWaitCursor(-1);
24782479 }
24792480
2481+// ReSharper disable once CppMemberFunctionMayBeConst
24802482 void CSVNProgressDlg::OnLvnBegindragSvnprogress(NMHDR* pNMHDR, LRESULT* pResult)
24812483 {
24822484 LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
@@ -4423,7 +4425,7 @@
44234425 return 0;
44244426 }
44254427
4426-CTSVNPathList CSVNProgressDlg::GetPathsForUpdateHook(const CTSVNPathList& pathList)
4428+CTSVNPathList CSVNProgressDlg::GetPathsForUpdateHook(const CTSVNPathList& pathList) const
44274429 {
44284430 CTSVNPathList updatedList;
44294431 if (!m_bNoHooks)
--- trunk/src/TortoiseProc/SVNProgressDlg.h (revision 29333)
+++ trunk/src/TortoiseProc/SVNProgressDlg.h (revision 29334)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2015, 2017, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2017, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -286,7 +286,7 @@
286286 void ReportString(CString sMessage, const CString& sMsgKind, bool colorIsDirect, COLORREF color = ::GetSysColor(COLOR_WINDOWTEXT));
287287 void AddItemToList(NotificationData* data);
288288 void RemoveItemFromList(size_t index);
289- CString BuildInfoString();
289+ CString BuildInfoString() const;
290290 CString GetPathFromColumnText(const CString& sColumnText) const;
291291 bool IsCommittingToTag(CString& url);
292292 void OnCommitFinished();
@@ -296,7 +296,7 @@
296296 void GenerateMergeLogMessage();
297297 static bool IsRevisionRelatedToMerge(const CDictionaryBasedTempPath& basePath, PLOGENTRYDATA pLogItem);
298298 void CompareWithWC(NotificationData* data);
299- CTSVNPathList GetPathsForUpdateHook(const CTSVNPathList& pathList);
299+ CTSVNPathList GetPathsForUpdateHook(const CTSVNPathList& pathList) const;
300300 void ResolvePostOperationConflicts();
301301
302302 /**
Show on old repository browser