Closed
Bug 229692
Opened 21 years ago
Closed 21 years ago
Simplify nsMsgDBView::Sort and friends
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: neil, Assigned: sspitzer)
Details
Attachments
(1 file)
14.36 KB,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
Basically there are two main changes:
1) Instead of storing dword values as an IdDWord of an EntryInfo and a PRUint32
I reuse the "len" field from the EntryInfo (now renamed IdDWord) structure.
2) Instead of having an EntryInfo member I derive the Key/PtrKey structures.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Updated•21 years ago
|
Attachment #138133 -
Flags: review?(bienvenu)
Comment 2•21 years ago
|
||
don't need the extra braces here...since you've already gotten rid of the extra
assignment.
+ if ((m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay) != 0)
+ {
+ return GetIndexForThread(msgHdr);
+ }
+
I'll note my r= in a sec.
Updated•21 years ago
|
Attachment #138133 -
Flags: review?(bienvenu) → review+
Reporter | ||
Updated•21 years ago
|
Attachment #138133 -
Flags: superreview?(mscott)
Updated•21 years ago
|
Attachment #138133 -
Flags: superreview?(mscott) → superreview+
Reporter | ||
Comment 3•21 years ago
|
||
Fix checked in. Thanks guys!
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 4•21 years ago
|
||
Looks like this increased the number of warnings on the Linux brad from 1948 to
1950. These two warnings are new:
1-2. mailnews/base/src/nsMsgDBView.cpp:3401 (See 1st of 2 warnings in build log)
Invalid access to non-static data member `IdKey::key' of NULL object
(perhaps the `offsetof' macro was used incorrectly)
3399 // build up the beast, so we can sort it.
3400 PRUint32 numSoFar = 0;
3401 const PRUint32 keyOffset = offsetof(IdKey, key);
3402 // calc max possible size needed for all the rest
3403 PRUint32 maxSize = (keyOffset + maxLen) * (arraySize - numSoFar);
(see http://tinderbox.mozilla.org/SeaMonkey/warn1073247120.10586.html#neil and
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1073247120.10586.gz:27887 )
Comment 5•21 years ago
|
||
Addition to comment 4:
Actually, the result is -1/+3:
Removed:
{
http://tinderbox.mozilla.org/SeaMonkey/warn1073243040.29880.html#sspitzer
4. mailnews/base/src/nsMsgDBView.cpp:5482 (See build log excerpt)
Comparison between signed and unsigned integer expressions
5480 if (aSucceeded)
5481 {
5482 PRUint32 numIndices = mIndicesToNoteChange.GetSize();
5483 if (numIndices)
5484 {
}
Added:
{
http://tinderbox.mozilla.org/SeaMonkey/warn1073247120.10586.html#naving
1. mailnews/base/src/nsMsgDBView.cpp:5392 (See build log excerpt)
Comparison between signed and unsigned integer expressions
5390 {
5391 rv = mTreeSelection->GetRangeAt(i, &startRange, &endRange);
5392 *msgToSelectAfterDelete = PR_MIN(*msgToSelectAfterDelete, startRange);
5393 }
5394 nsCOMPtr <nsIMsgImapMailFolder> imapFolder = do_QueryInterface(m_folder);
http://tinderbox.mozilla.org/SeaMonkey/warn1073247120.10586.html#neil
1-2. mailnews/base/src/nsMsgDBView.cpp:3401 (See 1st of 2 warnings in build log)
Invalid access to non-static data member `IdKey::key' of NULL object
(perhaps the `offsetof' macro was used incorrectly)
3399 // build up the beast, so we can sort it.
3400 PRUint32 numSoFar = 0;
3401 const PRUint32 keyOffset = offsetof(IdKey, key);
3402 // calc max possible size needed for all the rest
3403 PRUint32 maxSize = (keyOffset + maxLen) * (arraySize - numSoFar);
}
neil: could you fix them ? (do you want a separate bug filed ?)
Reporter | ||
Comment 6•21 years ago
|
||
I don't think the other two warnings are relevant.
I'm still regression testing my fix for the original warning, which is invalid
according to ISO C++ rules... rather than deriving the two versions (inline and
pointer key) I need to use a union.
Updated•20 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•