GetCategory const-correctness cleanup in DownloadListCtrl / CPartFile
Summary¶
The stale DownloadListCtrl.cpp comment was pointing at the wrong fix point.
The real issue was CPartFile::GetCategory(): DownloadListCtrl had to use
const_cast<CPartFile*> only because GetCategory() was not const.
main now makes CPartFile::GetCategory() const and removes the workaround
sites in DownloadListCtrl.cpp.
Landed Behavior¶
CPartFile::GetCategory()is now declared and definedconst.DownloadListCtrl.cppno longer usesconst_cast<CPartFile*>for category display/sort.- The stale TODO comment is removed.
- Existing lazy category clamping behavior is preserved.
Files¶
srchybrid/PartFile.hsrchybrid/PartFile.cppsrchybrid/DownloadListCtrl.cpp