Reviewed by Steve.
No regression tests affected.
* WebCore.vcproj/WebCore.vcproj: Turn the warning level up to 2, and
disable two warnings: implicit int <=> float conversion, and class vs.
struct inconsistency.
* dom/CharacterData.cpp:
(WebCore::CharacterData::deleteData): Cast to int before negating.
* loader/Cache.cpp:
(WebCore::Cache::remove): Ditto.
* platform/graphics/Path.cpp:
(WebCore::pathLengthApplierFunction): Consistently use floats.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawEllipse): Ditto.
* platform/win/GraphicsContextWin.cpp:
(WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@23868
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-06-28 Adam Roben <aroben@apple.com>
+
+ Get WebCore compiling with /W2 on Windows
+
+ Reviewed by Steve.
+
+ No regression tests affected.
+
+ * WebCore.vcproj/WebCore.vcproj: Turn the warning level up to 2, and
+ disable two warnings: implicit int <=> float conversion, and class vs.
+ struct inconsistency.
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::deleteData): Cast to int before negating.
+ * loader/Cache.cpp:
+ (WebCore::Cache::remove): Ditto.
+ * platform/graphics/Path.cpp:
+ (WebCore::pathLengthApplierFunction): Consistently use floats.
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::drawEllipse): Ditto.
+ * platform/win/GraphicsContextWin.cpp:
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): Ditto.
+
2007-06-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej Stachowiak.
RuntimeTypeInfo="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
- WarningLevel="1"
+ WarningLevel="2"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
- DisableSpecificWarnings="4138;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
+ DisableSpecificWarnings="4099;4138;4244;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
ForcedIncludeFiles="WebCorePrefix.h"
EnablePREfast="true"
/>
RuntimeTypeInfo="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
- WarningLevel="1"
+ WarningLevel="2"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
- DisableSpecificWarnings="4138;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
+ DisableSpecificWarnings="4099;4138;4244;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
ForcedIncludeFiles="WebCorePrefix.h"
EnablePREfast="true"
/>
RuntimeTypeInfo="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
- WarningLevel="1"
+ WarningLevel="2"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
- DisableSpecificWarnings="4138;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
+ DisableSpecificWarnings="4099;4138;4244;4996;4355;4291;4068;6011;6031;6211;6246;6255;6387"
ForcedIncludeFiles="WebCorePrefix.h"
EnablePREfast="true"
/>
>
</File>
<File
- RelativePath="..\bindings\js\JSEventTargetNode.cpp"
+ RelativePath="..\bindings\js\JSEventCustom.cpp"
>
</File>
<File
- RelativePath="..\bindings\js\JSEventCustom.cpp"
+ RelativePath="..\bindings\js\JSEventTargetNode.cpp"
>
</File>
<File
// update the markers for spell checking and grammar checking
document()->removeMarkers(this, offset, count);
- document()->shiftMarkers(this, offset + count, -count);
+ document()->shiftMarkers(this, offset + count, -static_cast<int>(count));
}
void CharacterData::replaceData( const unsigned offset, const unsigned count, const String &arg, ExceptionCode& ec)
(*itr)->removeCachedResource(resource);
// Subtract from our size totals.
- int delta = -resource->size();
+ int delta = -static_cast<int>(resource->size());
if (delta)
- adjustSize(resource->referenced(), delta, -resource->decodedSize());
+ adjustSize(resource->referenced(), delta, -static_cast<int>(resource->decodedSize()));
}
if (resource->canDelete())
float offset = traversalState.m_desiredLength - traversalState.m_totalLength;
traversalState.m_current.move(offset * cosf(slope), offset * sinf(slope));
} else {
- static const float rad2deg = 180.0f / M_PI;
+ static const float rad2deg = 180.0f / static_cast<float>(M_PI);
traversalState.m_normalAngle = slope * rad2deg;
}
CGContextRef context = platformContext();
CGContextBeginPath(context);
float r = (float)rect.width() / 2;
- CGContextAddArc(context, rect.x() + r, rect.y() + r, r, 0, 2*M_PI, 0);
+ CGContextAddArc(context, rect.x() + r, rect.y() + r, r, 0, static_cast<float>(2*M_PI), 0);
CGContextClosePath(context);
if (fillColor().alpha()) {
// Dash lengths for the top and bottom of the error underline are the same.
// These are magic.
static const float edge_dash_lengths[] = {2, 2};
- static const float middle_dash_lengths[] = {2.76, 1.24};
+ static const float middle_dash_lengths[] = {2.76f, 1.24f};
static const float edge_offset = -(edge_dash_lengths[1] - 1.0f) / 2.0f;
static const float middle_offset = -(middle_dash_lengths[1] - 1.0f) / 2.0f;