Summary: | [WinCairo] Compile errors when GStreamer is enabled. | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | peavo | ||||||||||||
Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | alex.christensen, benjamin, bfulgham, cmarcelo, commit-queue, ossy, pnormand, zan | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | PC | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
peavo
2014-09-22 06:51:56 PDT
Created attachment 238479 [details]
Patch
This breaks GTK and EFL though. Can you please fix it? What version of MSVC? (In reply to comment #0) > Also, MSVC cannot assign an initializer list to a struct. MSVC 2013 supposedly supports this. Does it support initializing a class object via the initializer list? Comment on attachment 238479 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238479&action=review > Source/WTF/wtf/gobject/GMainLoopSource.h:98 > + *this = c; That's a copy. Use WTF::move(). (In reply to comment #3) > What version of MSVC? > > (In reply to comment #0) > > Also, MSVC cannot assign an initializer list to a struct. > > MSVC 2013 supposedly supports this. Does it support initializing a class object via the initializer list? For clarity, here's the MSDN document: http://msdn.microsoft.com/en-us/library/dn387583.aspx Does MSVC compile this? m_context = Context({ adoptGRef(g_socket_create_source(socket, condition, socketCancellable)), adoptGRef(g_cancellable_new()), adoptGRef(socketCancellable), nullptr, // voidCallback nullptr, // boolCallback WTF::move(function), WTF::move(destroyFunction) }); (In reply to comment #5) > > Does MSVC compile this? > > m_context = Context({ > adoptGRef(g_socket_create_source(socket, condition, socketCancellable)), > adoptGRef(g_cancellable_new()), > adoptGRef(socketCancellable), > nullptr, // voidCallback > nullptr, // boolCallback > WTF::move(function), > WTF::move(destroyFunction) > }); No, the error is: 1>..\wtf\gobject\GMainLoopSource.cpp(130): error C2440: 'initializing' : cannot convert from 'initializer-list' to 'WTF::GMainLoopSource::Context' 1> No constructor could take the source type, or constructor overload resolution was ambiguous Created attachment 238537 [details]
Patch
(In reply to comment #3) > What version of MSVC? > MSVC 2013. The original error was: ..\wtf\gobject\GMainLoopSource.cpp(130): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'initializer-list' (or there is no acceptable conversion) Created attachment 238645 [details]
Patch
(In reply to comment #9) > Created an attachment (id=238645) [details] > Patch It turns out MSVC can assign an initializer list to a struct, but the move constructor causes a compile error. I removed the move constructor in the latest patch, but I'm not sure it just can be removed without other changes ... Created attachment 238647 [details]
Patch
(In reply to comment #11) > Created an attachment (id=238647) [details] > Patch Updated patch to fix compile errors. Apologies for nagging :) Any chance of a review? Created attachment 239862 [details]
Patch
(In reply to comment #14) > Created an attachment (id=239862) [details] > Patch Resolved conflicts. Comment on attachment 239862 [details]
Patch
Let's cross fingers a rebase is not needed :)
(In reply to comment #16) > Comment on attachment 239862 [details] > Patch > > Let's cross fingers a rebase is not needed :) Thanks for reviewing! Comment on attachment 239862 [details] Patch Clearing flags on attachment: 239862 Committed r176269: <http://trac.webkit.org/changeset/176269> All reviewed patches have been landed. Closing bug. |