diff options
Diffstat (limited to 'Swift/Controllers/Roster/LeastCommonSubsequence.h')
| -rw-r--r-- | Swift/Controllers/Roster/LeastCommonSubsequence.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/Controllers/Roster/LeastCommonSubsequence.h b/Swift/Controllers/Roster/LeastCommonSubsequence.h index 8daa20c..7988ee7 100644 --- a/Swift/Controllers/Roster/LeastCommonSubsequence.h +++ b/Swift/Controllers/Roster/LeastCommonSubsequence.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2011-2016 Isode Limited. | 2 | * Copyright (c) 2011-2018 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -32,7 +32,7 @@ namespace Swift { | |||
| 32 | Predicate predicate; | 32 | Predicate predicate; |
| 33 | for (size_t i = 1; i < width; ++i) { | 33 | for (size_t i = 1; i < width; ++i) { |
| 34 | for (size_t j = 1; j < height; ++j) { | 34 | for (size_t j = 1; j < height; ++j) { |
| 35 | result[i + j*width] = predicate(*(xBegin + boost::numeric_cast<long long>(i)-1), *(yBegin + boost::numeric_cast<long long >(j)-1)) ? result[(i-1) + (j-1)*width] + 1 : std::max(result[i + (j-1)*width], result[i-1 + (j*width)]); | 35 | result[i + j*width] = predicate(*(xBegin + static_cast<long long>(i)-1), *(yBegin + static_cast<long long>(j)-1)) ? result[(i-1) + (j-1)*width] + 1 : std::max(result[i + (j-1)*width], result[i-1 + (j*width)]); |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
Swift