]> granicus.if.org Git - icu/commitdiff
ICU-13629 Adding comments in replacementIndex getters.
authorShane Carr <shane@unicode.org>
Wed, 9 May 2018 00:14:36 +0000 (00:14 +0000)
committerShane Carr <shane@unicode.org>
Wed, 9 May 2018 00:14:36 +0000 (00:14 +0000)
X-SVN-Rev: 41364

icu4c/source/common/unicode/edits.h
icu4j/main/classes/core/src/com/ibm/icu/text/Edits.java

index 244347f2e6ed4feb55e20f8df99b05848cbc582f..f69cd8db3669b17c99dae4f761aeea375a881921 100644 (file)
@@ -378,7 +378,10 @@ public:
          *         not counting unchanged spans
          * @stable ICU 59
          */
-        int32_t replacementIndex() const { return replIndex; }
+        int32_t replacementIndex() const {
+            // TODO: Throw an exception if we aren't in a change edit?
+            return replIndex;
+        }
 
         /**
          * The start index of the current span in the destination string; the span has length
index 4c1d98897bcde2531dd32a0c2592fb8b1e0b1ad9..d8394321e570cec376e22ed6a8a1b2c0fa5344b4 100644 (file)
@@ -805,7 +805,10 @@ public final class Edits {
          *         spans
          * @stable ICU 59
          */
-        public int replacementIndex() { return replIndex; }
+        public int replacementIndex() {
+            // TODO: Throw an exception if we aren't in a change edit?
+            return replIndex;
+        }
 
         /**
          * The start index of the current span in the destination string; the span has length