Closed
Bug 328625
Opened 19 years ago
Closed 19 years ago
Fix missing casts and remove some dead code from bookmarks code
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-graveyard, Assigned: bugzilla-graveyard)
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 1 obsolete file)
10.45 KB,
patch
|
Details | Diff | Splinter Review |
Getting several compiler warnings in our bookmarks code, and there's a huge block of validation code commented out in BookmarkViewController.mm. The forthcoming patch fixes this stuff, at least in part.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #213226 -
Flags: review?(stuart.morgan)
Comment 2•19 years ago
|
||
Comment on attachment 213226 [details] [diff] [review]
fixes several casts, a spelling error, and removes unused validation code
Looks fine and still builds.
r=me
Attachment #213226 -
Flags: superreview?
Attachment #213226 -
Flags: review?(stuart.morgan)
Attachment #213226 -
Flags: review+
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 213226 [details] [diff] [review]
fixes several casts, a spelling error, and removes unused validation code
sr?=mento
Attachment #213226 -
Flags: superreview? → superreview?(mark)
Comment 4•19 years ago
|
||
Comment on attachment 213226 [details] [diff] [review]
fixes several casts, a spelling error, and removes unused validation code
>Index: mozilla/camino/src/bookmarks/BookmarkViewController.mm
>===================================================================
>@@ -771,17 +771,17 @@
> // XXX unused
> -(void) displayBookmarkInOutlineView:(BookmarkItem *)aBookmarkItem
OK. Are we ever going to kill abandoned code? #if 0 it out?
>@@ -841,17 +841,17 @@
>
> if ([mBookmarksOutlineView numberOfSelectedRows] == 1)
> {
> BookmarkItem *item = [self selectedBookmarkItem];
> // if it's a folder, use it
> if ([item isKindOfClass:[BookmarkFolder class]])
> {
> *outIndex = (int)[(BookmarkFolder*)item count];
>- return item;
>+ return (BookmarkFolder*)item;
It's unclean to cast to the same type twice in a row. How about:
BookmarkFolder* selectedFolder = (BookmarkFolder*) item;
*outIndex = [selectedFolder count];
return selectedFolder;
sr=me, as long as "s" means "second" :)
Attachment #213226 -
Flags: superreview?(mark) → superreview+
Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 213226 [details] [diff] [review]
fixes several casts, a spelling error, and removes unused validation code
Bitrotted.
Attachment #213226 -
Attachment is obsolete: true
Assignee | ||
Comment 6•19 years ago
|
||
Comment 7•19 years ago
|
||
Checked in, trunk and 1_8. Thanks for the cleanup patch.
Your second patch was so much smaller than the first, so I looked at the diff-to-diff diff and also fixed the "its" -> "it's" comment. For validateMenuItem:, I turned the /* */ into an #if 0 block. #if 0. The better way to kill. Bugs check in, but they don't check out.
You need to log in
before you can comment on or make changes to this bug.
Description
•