Changeset 7421 for sandbox_qt/src/libraries/util/StringUtils.cc
- Timestamp:
- Sep 12, 2010, 12:47:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox_qt/src/libraries/util/StringUtils.cc
r7401 r7421 35 35 36 36 #include <cctype> 37 #include <boost/scoped_array.hpp> 37 #include <QVarLengthArray> 38 #include <QDir> 39 38 40 #include "Convert.h" 39 41 #include "Math.h" … … 493 495 size_t cols = str1.size() + 1; 494 496 size_t rows = str2.size() + 1; 495 boost::scoped_array<int> matrix(new int[rows * cols]);497 QVarLengthArray<int> matrix(rows * cols); 496 498 497 499 for (size_t r = 0; r < rows; ++r) … … 516 518 return matrix[(rows-1)*cols + cols-1]; 517 519 } 520 521 QDir& operator/=(QDir& lhs, const QDir& rhs) 522 { 523 lhs.setPath(lhs.path() + QDir::separator() + rhs.path()); 524 return lhs; 525 } 526 527 QDir& operator/=(QDir& lhs, const QString& rhs) 528 { 529 return operator/=(lhs, QDir(rhs)); 530 } 531 532 QDir operator/(const QDir& lhs, const QDir& rhs) 533 { 534 return (QDir(lhs) /= rhs); 535 } 536 537 QDir operator/(const QDir& lhs, const QString& rhs) 538 { 539 return operator/(lhs, QDir(rhs)); 540 } 518 541 }
Note: See TracChangeset
for help on using the changeset viewer.