Skip to content
Permalink
Browse files
2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>
        Reviewed by Darin Adler.

        Compiler warnings in InspectorResource.h
        https://bugs.webkit.org/show_bug.cgi?id=29231

        Fix compilation warnings by removing addition operation on an enum type.

        * inspector/InspectorResource.h:
        (WebCore::InspectorResource::):
        (WebCore::InspectorResource::Changes::hasChange):
        (WebCore::InspectorResource::Changes::set):
        (WebCore::InspectorResource::Changes::setAll):

Canonical link: https://commits.webkit.org/42130@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@50700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Nov 10, 2009
1 parent f2fb491 commit 4c3fc2de1c591288a639d0236ceb2dbdf7a525d9
Showing with 20 additions and 2 deletions.
  1. +15 −0 WebCore/ChangeLog
  2. +5 −2 WebCore/inspector/InspectorResource.h
@@ -1,3 +1,18 @@
2009-11-09 Martin Robinson <martin.james.robinson@gmail.com>

Reviewed by Darin Adler.

Compiler warnings in InspectorResource.h
https://bugs.webkit.org/show_bug.cgi?id=29231

Fix compilation warnings by removing addition operation on an enum type.

* inspector/InspectorResource.h:
(WebCore::InspectorResource::):
(WebCore::InspectorResource::Changes::hasChange):
(WebCore::InspectorResource::Changes::set):
(WebCore::InspectorResource::Changes::setAll):

2009-11-09 Anders Carlsson <andersca@apple.com>

Reviewed by Darin Adler and Dan Bernstein.
@@ -125,10 +125,13 @@ namespace WebCore {
public:
Changes() : m_change(NoChange) {}

inline bool hasChange(ChangeType change) { return (m_change & change) || !(m_change + change); }
inline bool hasChange(ChangeType change)
{
return m_change & change || (m_change == NoChange && change == NoChange);
}
inline void set(ChangeType change)
{
m_change = static_cast<ChangeType>(static_cast<unsigned>(m_change) | static_cast<unsigned>(change));
m_change = static_cast<ChangeType>(static_cast<unsigned>(m_change) | static_cast<unsigned>(change));
}
inline void clear(ChangeType change)
{

0 comments on commit 4c3fc2d

Please sign in to comment.