Prefer prefix ++/-- operators for non-primitive types
https://bugs.webkit.org/show_bug.cgi?id=114033
Reviewed by Alexey Proskuryakov.
Post ++/-- creates a copy of current value and it is not necessary, so use prefix instead.
* bindings/js/Dictionary.cpp:
(WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
(WebCore::Dictionary::getOwnPropertyNames):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):
* dom/Range.cpp:
(WebCore::Range::processAncestorsAndTheirSiblings):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::detachChildren):
* platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
(WebCore):
(WebCore::LoopBlinnPathProcessor::subdivideCurvesSlow):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarkers):
* xml/XPathFunctions.cpp:
(WebCore::XPath::Function::setArguments):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 233874a..17f1f94 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2013-04-05 Kangil Han <kangil.han@samsung.com>
+
+ Prefer prefix ++/-- operators for non-primitive types
+ https://bugs.webkit.org/show_bug.cgi?id=114033
+
+ Reviewed by Alexey Proskuryakov.
+
+ Post ++/-- creates a copy of current value and it is not necessary, so use prefix instead.
+
+ * bindings/js/Dictionary.cpp:
+ (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
+ (WebCore::Dictionary::getOwnPropertyNames):
+ * bindings/js/ScriptCallStackFactory.cpp:
+ (WebCore::createScriptCallStack):
+ * dom/ContainerNode.cpp:
+ (WebCore::willRemoveChildren):
+ * dom/Range.cpp:
+ (WebCore::Range::processAncestorsAndTheirSiblings):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::detachChildren):
+ * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
+ (WebCore):
+ (WebCore::LoopBlinnPathProcessor::subdivideCurvesSlow):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintDocumentMarkers):
+ * xml/XPathFunctions.cpp:
+ (WebCore::XPath::Function::setArguments):
+
2013-04-05 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Add support for the simple case of shape-margin polygonal shape-outside
diff --git a/Source/WebCore/bindings/js/Dictionary.cpp b/Source/WebCore/bindings/js/Dictionary.cpp
index 5c81f20..39ac466 100644
--- a/Source/WebCore/bindings/js/Dictionary.cpp
+++ b/Source/WebCore/bindings/js/Dictionary.cpp
@@ -64,7 +64,7 @@
PropertyNameArray propertyNames(exec);
JSObject::getOwnPropertyNames(object, exec, propertyNames, ExcludeDontEnumProperties);
- for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != propertyNames.end(); it++) {
+ for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != propertyNames.end(); ++it) {
String stringKey = it->string();
if (stringKey.isEmpty())
continue;
@@ -89,7 +89,7 @@
PropertyNameArray propertyNames(exec);
JSObject::getOwnPropertyNames(object, exec, propertyNames, ExcludeDontEnumProperties);
- for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != propertyNames.end(); it++) {
+ for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != propertyNames.end(); ++it) {
String stringKey = it->string();
if (!stringKey.isEmpty())
names.append(stringKey);
diff --git a/Source/WebCore/dom/ContainerNode.cpp b/Source/WebCore/dom/ContainerNode.cpp
index 8a25837..49cc857 100644
--- a/Source/WebCore/dom/ContainerNode.cpp
+++ b/Source/WebCore/dom/ContainerNode.cpp
@@ -462,7 +462,7 @@
container->document()->nodeChildrenWillBeRemoved(container);
ChildListMutationScope mutation(container);
- for (NodeVector::const_iterator it = children.begin(); it != children.end(); it++) {
+ for (NodeVector::const_iterator it = children.begin(); it != children.end(); ++it) {
Node* child = it->get();
mutation.willRemoveChild(child);
child->notifyMutationObserversNodeWillDetach();
diff --git a/Source/WebCore/dom/Range.cpp b/Source/WebCore/dom/Range.cpp
index 3e56cb0..5651138 100644
--- a/Source/WebCore/dom/Range.cpp
+++ b/Source/WebCore/dom/Range.cpp
@@ -873,7 +873,7 @@
ancestors.append(n);
RefPtr<Node> firstChildInAncestorToProcess = direction == ProcessContentsForward ? container->nextSibling() : container->previousSibling();
- for (Vector<RefPtr<Node> >::const_iterator it = ancestors.begin(); it != ancestors.end(); it++) {
+ for (Vector<RefPtr<Node> >::const_iterator it = ancestors.begin(); it != ancestors.end(); ++it) {
RefPtr<Node> ancestor = *it;
if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) {
if (RefPtr<Node> clonedAncestor = ancestor->cloneNode(false)) { // Might have been removed already during mutation event.
@@ -892,7 +892,7 @@
child = (direction == ProcessContentsForward) ? child->nextSibling() : child->previousSibling())
nodes.append(child);
- for (NodeVector::const_iterator it = nodes.begin(); it != nodes.end(); it++) {
+ for (NodeVector::const_iterator it = nodes.begin(); it != nodes.end(); ++it) {
Node* child = it->get();
switch (action) {
case DELETE_CONTENTS:
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp
index 273198d..87a4083 100644
--- a/Source/WebCore/loader/FrameLoader.cpp
+++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -2305,7 +2305,7 @@
for (Frame* child = m_frame->tree()->lastChild(); child; child = child->tree()->previousSibling())
childrenToDetach.append(child);
FrameVector::iterator end = childrenToDetach.end();
- for (FrameVector::iterator it = childrenToDetach.begin(); it != end; it++)
+ for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it)
(*it)->loader()->detachFromParent();
}
diff --git a/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp b/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
index a1d6679..ab1a774 100644
--- a/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
+++ b/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
@@ -1098,9 +1098,7 @@
for (Vector<Segment*>::iterator iter = curSegments.begin(); iter != curSegments.end(); ++iter) {
Segment* seg = *iter;
ASSERT(seg->kind() == Segment::Cubic);
- for (Vector<Segment*>::iterator iter2 = curSegments.begin();
- iter2 != curSegments.end();
- iter2++) {
+ for (Vector<Segment*>::iterator iter2 = curSegments.begin(); iter2 != curSegments.end(); ++iter2) {
Segment* seg2 = *iter2;
ASSERT(seg2->kind() == Segment::Cubic);
if (seg != seg2) {
diff --git a/Source/WebCore/rendering/InlineTextBox.cpp b/Source/WebCore/rendering/InlineTextBox.cpp
index 58a4005..1e9f6a5 100644
--- a/Source/WebCore/rendering/InlineTextBox.cpp
+++ b/Source/WebCore/rendering/InlineTextBox.cpp
@@ -1398,7 +1398,7 @@
// Give any document markers that touch this run a chance to draw before the text has been drawn.
// Note end() points at the last char, not one past it like endOffset and ranges do.
- for ( ; markerIt != markers.end(); markerIt++) {
+ for ( ; markerIt != markers.end(); ++markerIt) {
DocumentMarker* marker = *markerIt;
// Paint either the background markers or the foreground markers, but not both
diff --git a/Source/WebCore/xml/XPathFunctions.cpp b/Source/WebCore/xml/XPathFunctions.cpp
index 6b095a8..0b3ba07 100644
--- a/Source/WebCore/xml/XPathFunctions.cpp
+++ b/Source/WebCore/xml/XPathFunctions.cpp
@@ -299,7 +299,7 @@
setIsContextNodeSensitive(false);
Vector<Expression*>::const_iterator end = args.end();
- for (Vector<Expression*>::const_iterator it = args.begin(); it != end; it++)
+ for (Vector<Expression*>::const_iterator it = args.begin(); it != end; ++it)
addSubExpression(*it);
}