| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 while (from < to) { | 256 while (from < to) { |
| 257 m_nodes[from].swap(m_nodes[to]); | 257 m_nodes[from].swap(m_nodes[to]); |
| 258 ++from; | 258 ++from; |
| 259 --to; | 259 --to; |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 Node* NodeSet::firstNode() const | 263 Node* NodeSet::firstNode() const |
| 264 { | 264 { |
| 265 if (isEmpty()) | 265 if (isEmpty()) |
| 266 return 0; | 266 return nullptr; |
| 267 | 267 |
| 268 // FIXME: fully sorting the node-set just to find its first node is | 268 // FIXME: fully sorting the node-set just to find its first node is |
| 269 // wasteful. | 269 // wasteful. |
| 270 sort(); | 270 sort(); |
| 271 return m_nodes.at(0).get(); | 271 return m_nodes.at(0).get(); |
| 272 } | 272 } |
| 273 | 273 |
| 274 Node* NodeSet::anyNode() const | 274 Node* NodeSet::anyNode() const |
| 275 { | 275 { |
| 276 if (isEmpty()) | 276 if (isEmpty()) |
| 277 return 0; | 277 return nullptr; |
| 278 | 278 |
| 279 return m_nodes.at(0).get(); | 279 return m_nodes.at(0).get(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 } | 282 } |
| 283 } | 283 } |
| OLD | NEW |