Skip to content

Commit 5543d04

Browse files
authored
Update clistbox-class_23.cpp
the buffer required by later code would be 16 bytes in ANSI and 32 bytes in Unicode, preallocating 10 bytes is useless.
1 parent 1d1b592 commit 5543d04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Initialize the storage of the list box to be 256 strings with
22
// about 10 characters per string, performance improvement.
3-
int n = m_myListBox.InitStorage(256, 10);
3+
int n = m_myListBox.InitStorage(256, 16*sizeof(TCHAR));
44
ASSERT(n != LB_ERRSPACE);
55

66
// Add 256 items to the list box.
@@ -9,4 +9,4 @@
99
{
1010
str.Format(_T("item string %d"), i);
1111
m_myListBox.AddString( str );
12-
}
12+
}

0 commit comments

Comments
 (0)