Closed Bug 424650 Opened 16 years ago Closed 16 years ago

Wrong nsAutoPtr usage break Mingw build

Categories

(Core :: Graphics, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta5

People

(Reporter: Techrazy.Yang, Assigned: Techrazy.Yang)

References

Details

Attachments

(1 file)

There is one line of code break Mingw build of Firefox trunk. And it is :

nsAutoPtr<UniscribeItem> item = us.GetItem(i, this);

The mingw gcc complain that it request a conversion between UniscribeItem* to nsAutoPtr<UniscribeItem>. And after I have searh some code of Mozilla, I can't find any similar usage with nsAutoPtr. Maybe this is a Microsoft C compiler only usage? 

Anyway, I decide to report this as a bug and hope I can get more advice!
Thanks!
Change 

nsAutoPtr<UniscribeItem> item = us.GetItem(i, this);

to

nsAutoPtr<UniscribeItem> item(us.GetItem(i, this));

to make the compiler not complain.
Blocks: mingw
Comment on attachment 311240 [details] [diff] [review]
A potential patch

Thanks for the patch!
You need to ask review, if you want the patch to get checked in, eventually.
Attachment #311240 - Flags: review?(pavlov)
Attachment #311240 - Flags: review?(pavlov) → review+
Assignee: nobody → Techrazy.Yang
Status: NEW → ASSIGNED
Component: General → GFX: Thebes
Product: Firefox → Core
QA Contact: general → thebes
Comment on attachment 311240 [details] [diff] [review]
A potential patch

One-line build fix for mingw.
Attachment #311240 - Flags: approval1.9b5?
Attachment #311240 - Flags: approval1.9?
Comment on attachment 311240 [details] [diff] [review]
A potential patch

a1.9b5=beltzner
Attachment #311240 - Flags: approval1.9b5?
Attachment #311240 - Flags: approval1.9b5+
Attachment #311240 - Flags: approval1.9?
Attachment #311240 - Flags: approval1.9+
Checking in gfx/thebes/src/gfxWindowsFonts.cpp;
/cvsroot/mozilla/gfx/thebes/src/gfxWindowsFonts.cpp,v  <--  gfxWindowsFonts.cpp
new revision: 1.183; previous revision: 1.182
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: