Skip to content

Commit

Permalink
automatic memory management, tweaked annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
ariccio committed Jan 12, 2015
1 parent 17c45ca commit 5ffbdb0
Show file tree
Hide file tree
Showing 15 changed files with 233 additions and 211 deletions.
2 changes: 1 addition & 1 deletion WinDirStat/windirstat/PageTreemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void CPageTreemap::OnSomethingChanged( ) {
SetModified( );
}

void CPageTreemap::ValuesAltered( _In_ const bool altered = true ) {
void CPageTreemap::ValuesAltered( _In_ const bool altered ) {
m_altered = altered;
//auto s = MAKEINTRESOURCEW( m_altered ? IDS_RESETTO_DEFAULTS : IDS_BACKTO_USERSETTINGS );
m_resetButton.SetWindowTextW( m_altered ? L"&Reset to\r\nDefaults" : L"Back to\r\n&User Settings" );
Expand Down
46 changes: 24 additions & 22 deletions WinDirStat/windirstat/SelectDrivesDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,27 @@ namespace {

void SetDriveInformation( _In_ CDriveItem* thisDriveItem, _In_ const bool success, _In_ std::wstring name, _In_ const std::uint64_t total, _In_ const std::uint64_t free ) {
if ( success ) {
if ( thisDriveItem->m_name != NULL ) {
delete[ ] thisDriveItem->m_name;
thisDriveItem->m_name = NULL;
if ( thisDriveItem->m_name.get( ) != nullptr ) {
thisDriveItem->m_name.reset( );
//thisDriveItem->m_name = NULL;
}
ASSERT( name.length( ) < UINT16_MAX );
const auto new_name_length = static_cast<std::uint16_t>( name.length( ) );
ASSERT( new_name_length < UINT16_MAX );
PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr, static_cast<rsize_t>( new_name_length + 1u ), name.c_str( ) );
_Null_terminated_ _Field_size_( new_name_length + 1u ) PWSTR new_name_ptr_temp = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr_temp, static_cast<rsize_t>( new_name_length + 1u ), name.c_str( ) );
if ( cpy_res != 0 ) {
std::terminate( );
}
_Null_terminated_ _Field_size_( new_name_length + 1u ) const PCWSTR new_name_ptr = new_name_ptr_temp;
ASSERT( wcslen( new_name_ptr ) == new_name_length );
ASSERT( wcscmp( new_name_ptr, name.c_str( ) ) == 0 );

thisDriveItem->m_name = new_name_ptr;
thisDriveItem->m_name_length= new_name_length;
thisDriveItem->m_totalBytes = total;
thisDriveItem->m_freeBytes = free;
thisDriveItem->m_used = 0;
thisDriveItem->m_name.reset( new_name_ptr );
thisDriveItem->m_name_length = new_name_length;
thisDriveItem->m_totalBytes = total;
thisDriveItem->m_freeBytes = free;
thisDriveItem->m_used = 0;

if ( thisDriveItem->m_totalBytes > 0 ) {
ASSERT( thisDriveItem->m_totalBytes >= thisDriveItem->m_freeBytes );
Expand All @@ -96,23 +97,24 @@ namespace {
thisDriveItem->m_freeBytes = UINT64_MAX;
thisDriveItem->m_used = -1;

if ( thisDriveItem->m_name != NULL ) {
delete[ ] thisDriveItem->m_name;
thisDriveItem->m_name = NULL;
if ( thisDriveItem->m_name != nullptr ) {
thisDriveItem->m_name.reset( );
//thisDriveItem->m_name = NULL;
}
const auto new_name_length = static_cast<std::uint16_t>( name.length( ) );
ASSERT( new_name_length < UINT16_MAX );
PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr, static_cast<rsize_t>( new_name_length + 1 ), name.c_str( ) );
_Null_terminated_ _Field_size_( new_name_length + 1u ) PWSTR new_name_ptr_temp = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr_temp, static_cast<rsize_t>( new_name_length + 1 ), name.c_str( ) );
if ( cpy_res != 0 ) {
std::terminate( );
}

_Null_terminated_ _Field_size_( new_name_length + 1u ) const PCWSTR new_name_ptr = new_name_ptr_temp;
ASSERT( wcslen( new_name_ptr ) == new_name_length );
ASSERT( wcscmp( new_name_ptr, name.c_str( ) ) == 0 );

thisDriveItem->m_name = new_name_ptr;
thisDriveItem->m_name_length= new_name_length;
thisDriveItem->m_name.reset( new_name_ptr );
thisDriveItem->m_name_length = new_name_length;
}
}

Expand Down Expand Up @@ -143,7 +145,7 @@ INT CDriveItem::Compare( _In_ const COwnerDrawnListItem* const baseOther, RANGE_
}

_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
HRESULT CDriveItem::Text_WriteToStackBuffer_COL_TOTAL( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
HRESULT CDriveItem::Text_WriteToStackBuffer_COL_TOTAL( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
const auto res = FormatBytes( ( ( subitem == column::COL_TOTAL ) ? m_totalBytes : m_freeBytes ), psz_text, strSize, chars_written );
if ( res == STRSAFE_E_INSUFFICIENT_BUFFER ) {
chars_written = strSize;
Expand All @@ -153,7 +155,7 @@ HRESULT CDriveItem::Text_WriteToStackBuffer_COL_TOTAL( RANGE_ENUM_COL const colu
}

_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
HRESULT CDriveItem::WriteToStackBuffer_default( WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
HRESULT CDriveItem::WriteToStackBuffer_default( WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
ASSERT( false );
if ( strSize > 41 ) {
write_bad_fmt_msg( psz_text, chars_written );
Expand All @@ -163,8 +165,8 @@ HRESULT CDriveItem::WriteToStackBuffer_default( WDS_WRITES_TO_STACK( strSize, ch
return STRSAFE_E_INSUFFICIENT_BUFFER;
}

_Must_inspect_result_ _On_failure_( _Post_satisfies_( sizeBuffNeed == SIZE_T_ERROR ) ) _Success_( SUCCEEDED( return ) )
HRESULT CDriveItem::Text_WriteToStackBuffer( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
HRESULT CDriveItem::Text_WriteToStackBuffer( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Out_ _On_failure_( _Post_valid_ ) rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const {
switch ( subitem )
{
case column::COL_TOTAL:
Expand Down Expand Up @@ -432,7 +434,7 @@ void CSelectDrivesDlg::buildSelectList( ) {
ASSERT( s.GetLength( ) < UINT16_MAX );
const auto new_name_length = static_cast<rsize_t>( s.GetLength( ) );
ASSERT( new_name_length < UINT16_MAX );
PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
_Null_terminated_ _Field_size_( new_name_length + 1u ) PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr, static_cast<rsize_t>( new_name_length + 1u ), s.GetString( ) );
if ( cpy_res != 0 ) {
std::terminate( );
Expand Down
8 changes: 4 additions & 4 deletions WinDirStat/windirstat/SelectDrivesDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ class CDriveItem final : public COwnerDrawnListItem {
}

_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
HRESULT Text_WriteToStackBuffer_COL_TOTAL( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const;
HRESULT Text_WriteToStackBuffer_COL_TOTAL( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const;
_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
HRESULT WriteToStackBuffer_default( WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const;
_Must_inspect_result_ _On_failure_( _Post_satisfies_( sizeBuffNeed == SIZE_T_ERROR ) ) _Success_( SUCCEEDED( return ) )
virtual HRESULT Text_WriteToStackBuffer( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Inout_ rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const override final;
HRESULT WriteToStackBuffer_default( WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const;
_Must_inspect_result_ _Success_( SUCCEEDED( return ) )
virtual HRESULT Text_WriteToStackBuffer( RANGE_ENUM_COL const column::ENUM_COL subitem, WDS_WRITES_TO_STACK( strSize, chars_written ) PWSTR psz_text, _In_ const rsize_t strSize, _Out_ _On_failure_( _Post_valid_ ) rsize_t& sizeBuffNeed, _Out_ rsize_t& chars_written ) const override final;

public:
const std::wstring m_path; // e.g. "C:\"
Expand Down
49 changes: 27 additions & 22 deletions WinDirStat/windirstat/TreeListControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ namespace
}

CTreeListItem::~CTreeListItem( ) {
delete m_vi;
m_vi = { NULL };
//delete m_vi;
//m_vi = { NULL };
m_parent = { NULL };
}

Expand Down Expand Up @@ -141,12 +141,13 @@ void CTreeListItem::childNotNull( CItemBranch* const aTreeListChild, const size_
//TRACE( _T( "aTreeListChild: %s\r\n" ), aTreeListChild->GetText( column::COL_NAME ).c_str( ) );
ASSERT( m_vi->sortedChildren.at( i ) == aTreeListChild );
//ASSERT( m_vi->sortedChildren.at( i )->GetText( column::COL_NAME ).compare( aTreeListChild->GetText( column::COL_NAME ) ) == 0 );
ASSERT( wcscmp( m_vi->sortedChildren.at( i )->m_name, aTreeListChild->m_name ) == 0 );
ASSERT( wcscmp( m_vi->sortedChildren.at( i )->m_name.get( ), aTreeListChild->m_name.get( ) ) == 0 );
m_vi->sortedChildren.at( i ) = aTreeListChild;
}
}

_Pre_satisfies_( this->m_vi != NULL ) void CTreeListItem::SortChildren( ) {
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
void CTreeListItem::SortChildren( ) {
ASSERT( IsVisible( ) );
//m_vi->sortedChildren.reserve( GetChildrenCount( ) );
//const auto childCount = GetChildrenCount( );
Expand Down Expand Up @@ -186,14 +187,14 @@ size_t CTreeListItem::GetChildrenCount_( ) const {

_Ret_maybenull_
CItemBranch* CTreeListItem::children_ptr( ) const {
return static_cast< const CItemBranch* >( this )->m_children;
return static_cast< const CItemBranch* >( this )->m_children.get( );
}


_Success_( return != NULL ) _Must_inspect_result_ _Ret_maybenull_
CTreeListItem* CTreeListItem::GetSortedChild( _In_ const size_t i ) const {
ASSERT( m_vi != NULL );
if ( m_vi != NULL ) {
ASSERT( m_vi != nullptr );
if ( m_vi != nullptr ) {
if ( !( m_vi->sortedChildren.empty( ) ) ) {
return m_vi->sortedChildren.at( i );
}
Expand Down Expand Up @@ -255,13 +256,14 @@ _Pre_satisfies_( this->m_parent != NULL ) bool CTreeListItem::HasSiblings( ) con

void CTreeListItem::SetVisible( _In_ const bool next_state_visible ) const {
if ( next_state_visible ) {
if ( m_vi != NULL ) {
delete m_vi;
if ( m_vi != nullptr ) {
//delete m_vi;
m_vi.reset( );
//m_vi = new VISIBLEINFO;
m_vi = { NULL };
//m_vi = { NULL };
}
ASSERT( m_vi == NULL );
m_vi = new VISIBLEINFO;
ASSERT( m_vi == nullptr );
m_vi.reset( new VISIBLEINFO );
m_vi->isExpanded = false;
if ( m_parent == NULL ) {
m_vi->indent = 0;
Expand All @@ -280,9 +282,10 @@ void CTreeListItem::SetVisible( _In_ const bool next_state_visible ) const {
//m_vi->sizeCache = static_cast< const CItemBranch* >( this )->size_recurse( );
}
else {
ASSERT( m_vi != NULL );
delete m_vi;
m_vi = { NULL };
ASSERT( m_vi != nullptr );
//delete m_vi;
//m_vi = { NULL };
m_vi.reset( );
}
}

Expand All @@ -300,12 +303,14 @@ _Ret_notnull_ CTreeListControl* CTreeListItem::GetTreeListControl( ) {
return tlc;
}

_Pre_satisfies_( this->m_vi != NULL ) CRect CTreeListItem::GetPlusMinusRect( ) const {
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
CRect CTreeListItem::GetPlusMinusRect( ) const {
ASSERT( IsVisible( ) );
return BuildCRect( m_vi->rcPlusMinus );
}

_Pre_satisfies_( this->m_vi != NULL ) CRect CTreeListItem::GetTitleRect( ) const {
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
CRect CTreeListItem::GetTitleRect( ) const {
ASSERT( IsVisible( ) );
return BuildCRect( m_vi->rcTitle );
}
Expand Down Expand Up @@ -370,13 +375,13 @@ void CTreeListControl::pathZeroNotNull( _In_ const CTreeListItem* const pathZero
void CTreeListControl::thisPathNotNull( _In_ const CTreeListItem* const thisPath, const int i, int& parent, _In_ const bool showWholePath, const std::vector<const CTreeListItem *>& path ) {
auto index = FindTreeItem( thisPath );
if ( index == -1 ) {
TRACE( _T( "Searching %s ( this path element ) for next path element...not found! Expanding %I64d...\r\n" ), thisPath->m_name, i );
TRACE( _T( "Searching %s ( this path element ) for next path element...not found! Expanding %I64d...\r\n" ), thisPath->m_name.get( ), i );
ExpandItem( i, false );
index = FindTreeItem( thisPath );
TRACE( _T( "Set index to %i\r\n" ), index );
}
else {
TRACE( _T( "Searching %s for next path element...found! path.at( %I64d ), index: %i\r\n" ), thisPath->m_name, i, index );
TRACE( _T( "Searching %s for next path element...found! path.at( %I64d ), index: %i\r\n" ), thisPath->m_name.get( ), i, index );
CollapseKThroughIndex( index, parent, thisPath );
TRACE( _T( "Collapsing items [%i, %i), new index %i. Item count: %i\r\n" ), ( parent + 1 ), index, index, GetItemCount( ) );
}
Expand Down Expand Up @@ -553,7 +558,7 @@ void CTreeListControl::SelectItem( _In_ _In_range_( 0, INT_MAX ) const INT i ) {

void CTreeListControl::PrepareDefaultMenu( _Out_ CMenu* const menu, _In_ const CItemBranch* const item ) {
//if ( item->m_type == IT_FILE ) {
if ( item->m_children == NULL ) {
if ( item->m_children == nullptr ) {
VERIFY( menu->DeleteMenu( 0, MF_BYPOSITION ) ); // Remove "Expand/Collapse" item
VERIFY( menu->DeleteMenu( 0, MF_BYPOSITION ) ); // Remove separator
}
Expand Down Expand Up @@ -841,7 +846,7 @@ void CTreeListControl::OnItemDoubleClick ( _In_ _In_range_( 0, INT_MAX ) const I
const auto item = static_cast< const CItemBranch* >( GetItem( i ) );
if ( item != NULL ) {
//if ( item->m_type == IT_FILE ) {
if ( item->m_children == NULL ) {
if ( item->m_children == nullptr ) {
TRACE( _T( "User double-clicked %s in TreeListControl! Opening Item!\r\n" ), item->GetPath( ).c_str( ) );
return GetDocument( )->OpenItem( *item );
}
Expand All @@ -857,7 +862,7 @@ void CTreeListControl::ExpandItemInsertChildren( _In_ _In_range_( 0, INT32_MAX )
auto maxwidth = GetSubItemWidth( item, column::COL_NAME );
const auto count = item->GetChildrenCount_( );
const auto myCount = static_cast<size_t>( GetItemCount( ) );
TRACE( _T( "Expanding %s! Must insert %i items!\r\n" ), item->m_name, count );
TRACE( _T( "Expanding %s! Must insert %i items!\r\n" ), item->m_name.get( ), count );
SetItemCount( static_cast<INT>( ( count >= myCount) ? count + 1 : myCount + 1 ) );

insertItemsAdjustWidths( count, item, maxwidth, scroll, i );
Expand Down
21 changes: 11 additions & 10 deletions WinDirStat/windirstat/TreeListControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,25 @@ class CTreeListItem : public COwnerDrawnListItem {

size_t FindSortedChild ( _In_ const CTreeListItem* const child ) const;

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
std::int16_t GetIndent( ) const {
ASSERT( IsVisible( ) );
return m_vi->indent;
}

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
void SetExpanded( _In_ const bool expanded = true ) {
ASSERT( IsVisible( ) );
m_vi->isExpanded = expanded;
}

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
void SetPlusMinusRect( _In_ const CRect& rc ) const {
ASSERT( IsVisible( ) );
m_vi->rcPlusMinus = SRECT( rc );
}

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
void SetTitleRect( _In_ const CRect& rc ) const {
ASSERT( IsVisible( ) );
m_vi->rcTitle = SRECT( rc );
Expand All @@ -122,7 +122,8 @@ class CTreeListItem : public COwnerDrawnListItem {
//_At_( this->m_vi, _When_( next_state_visible == false, _Post_ptr_invalid_ ) )
//_At_( this->m_vi, _When_( next_state_visible == false, _Post_invalid_ ) )
void SetVisible ( _In_ const bool next_state_visible = true ) const;
_Pre_satisfies_( this->m_vi != NULL )

_Pre_satisfies_( this->m_vi._Myptr != nullptr )
void SortChildren ( );
_Pre_satisfies_( this->m_parent != NULL )
bool HasSiblings ( ) const;
Expand All @@ -133,20 +134,20 @@ class CTreeListItem : public COwnerDrawnListItem {
return ( children_ptr( ) != NULL );
}

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
bool IsExpanded( ) const {
ASSERT( IsVisible( ) );
return m_vi->isExpanded;
}

bool IsVisible( ) const {
return ( m_vi != NULL );
return ( m_vi != nullptr );
}

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
CRect GetPlusMinusRect( ) const;

_Pre_satisfies_( this->m_vi != NULL )
_Pre_satisfies_( this->m_vi._Myptr != nullptr )
CRect GetTitleRect( ) const;

static bool _compareProc2( const CTreeListItem* const lhs, const CTreeListItem* const rhs );
Expand All @@ -158,7 +159,7 @@ class CTreeListItem : public COwnerDrawnListItem {
CTreeListItem* m_parent;

// Data needed to display the item.
mutable VISIBLEINFO* m_vi = NULL;
mutable std::unique_ptr<VISIBLEINFO> m_vi = nullptr;
};


Expand Down
8 changes: 5 additions & 3 deletions WinDirStat/windirstat/dirstatdoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void CDirstatDoc::buildDriveItems( _In_ const std::vector<std::wstring>& rootFol
else {
const auto new_name_length = rootFolders.at( 0 ).length( );
ASSERT( new_name_length < UINT16_MAX );
PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
_Null_terminated_ _Field_size_( new_name_length + 1u ) PWSTR new_name_ptr = new wchar_t[ new_name_length + 1u ];
const auto cpy_res = wcscpy_s( new_name_ptr, ( new_name_length + 1u ), rootFolders.at( 0 ).c_str( ) );
if ( cpy_res != 0 ) {
std::terminate( );
Expand Down Expand Up @@ -403,12 +403,12 @@ void CDirstatDoc::SetHighlightExtension( _In_ const std::wstring ext ) {
}

//_Pre_satisfies_( item.m_type == IT_FILE )
_Pre_satisfies_( item.m_children == NULL )
_Pre_satisfies_( item.m_children._Myptr == nullptr )
void CDirstatDoc::OpenItem( _In_ const CItemBranch& item ) {
CWaitCursor wc;
std::wstring path;
//if ( item.m_type == IT_FILE ) {
if ( item.m_children == NULL ) {
if ( item.m_children == nullptr ) {
path = item.GetPath( ).c_str( );
}
const auto doesFileExist = PathFileExistsW( path.c_str( ) );
Expand Down Expand Up @@ -436,6 +436,8 @@ void CDirstatDoc::RebuildExtensionData() {
std::unordered_map<std::wstring, SExtensionRecord> extensionMap;

auto rootTemp = m_rootItem.get( );

extensionMap.reserve( rootTemp->files_recurse( ) );

rootTemp->stdRecurseCollectExtensionData( extensionMap );
AddFileExtensionData( m_extensionRecords, extensionMap );
Expand Down
2 changes: 1 addition & 1 deletion WinDirStat/windirstat/dirstatdoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CDirstatDoc final : public CDocument {
bool OnWorkFinished ( );

//_Pre_satisfies_( item.m_type == IT_FILE )
_Pre_satisfies_( item.m_children == NULL )
_Pre_satisfies_( item.m_children._Myptr == nullptr )
void OpenItem ( _In_ const CItemBranch& item );
void SetSelection ( _In_ const CItemBranch& item );

Expand Down

0 comments on commit 5ffbdb0

Please sign in to comment.