Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: Source/platform/PODRedBlackTree.h

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/PODInterval.h ('k') | Source/platform/UUID.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 WTF_LOG_ERROR("%s", output); 790 WTF_LOG_ERROR("%s", output);
791 } 791 }
792 #endif 792 #endif
793 793
794 #ifndef NDEBUG 794 #ifndef NDEBUG
795 // Dumps the subtree rooted at the given node. 795 // Dumps the subtree rooted at the given node.
796 void dumpFromNode(Node* node, int indentation) const 796 void dumpFromNode(Node* node, int indentation) const
797 { 797 {
798 StringBuilder builder; 798 StringBuilder builder;
799 for (int i = 0; i < indentation; i++) 799 for (int i = 0; i < indentation; i++)
800 builder.append(" "); 800 builder.append(' ');
801 builder.append("-"); 801 builder.append('-');
802 if (node) { 802 if (node) {
803 builder.append(" "); 803 builder.append(' ');
804 builder.append(ValueToString<T>::string(node->data())); 804 builder.append(ValueToString<T>::string(node->data()));
805 builder.append((node->color() == Black) ? " (black)" : " (red)"); 805 builder.append((node->color() == Black) ? " (black)" : " (red)");
806 } 806 }
807 WTF_LOG_ERROR("%s", builder.toString().ascii().data()); 807 WTF_LOG_ERROR("%s", builder.toString().ascii().data());
808 if (node) { 808 if (node) {
809 dumpFromNode(node->left(), indentation + 2); 809 dumpFromNode(node->left(), indentation + 2);
810 dumpFromNode(node->right(), indentation + 2); 810 dumpFromNode(node->right(), indentation + 2);
811 } 811 }
812 } 812 }
813 #endif 813 #endif
814 814
815 //---------------------------------------------------------------------- 815 //----------------------------------------------------------------------
816 // Data members 816 // Data members
817 817
818 RefPtr<PODFreeListArena<Node> > m_arena; 818 RefPtr<PODFreeListArena<Node> > m_arena;
819 Node* m_root; 819 Node* m_root;
820 bool m_needsFullOrderingComparisons; 820 bool m_needsFullOrderingComparisons;
821 #ifndef NDEBUG 821 #ifndef NDEBUG
822 bool m_verboseDebugging; 822 bool m_verboseDebugging;
823 #endif 823 #endif
824 }; 824 };
825 825
826 } // namespace blink 826 } // namespace blink
827 827
828 #endif // PODRedBlackTree_h 828 #endif // PODRedBlackTree_h
OLDNEW
« no previous file with comments | « Source/platform/PODInterval.h ('k') | Source/platform/UUID.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698