Permalink
Browse files

Disabling unused code in DiffMatchPatchCFUtilities.

  • Loading branch information...
1 parent 46a5c4b commit c89be3a5ce590de69f8c95f5d127b04f2922a2fe @JanX2 committed May 28, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 DiffMatchPatchCFUtilities.c
View
8 DiffMatchPatchCFUtilities.c
@@ -29,9 +29,11 @@
#include <limits.h>
#include <AssertMacros.h>
+#if ENABLE_UNUSED_CODE
CFRange diff_RightSubstringRange(CFIndex text_length, CFIndex new_length);
-CFStringRef diff_CFStringCreateRightSubstring(CFStringRef text, CFIndex text_length, CFIndex new_length);
CFRange diff_LeftSubstringRange(CFIndex new_length);
+#endif
+CFStringRef diff_CFStringCreateRightSubstring(CFStringRef text, CFIndex text_length, CFIndex new_length);
CFStringRef diff_CFStringCreateLeftSubstring(CFStringRef text, CFIndex new_length);
CFStringRef diff_CFStringCreateSubstringWithStartIndex(CFStringRef text, CFIndex start_index);
CFStringRef diff_CFStringCreateJavaSubstring(CFStringRef s, CFIndex begin, CFIndex end);
@@ -58,25 +60,29 @@ CF_INLINE CFStringRef diff_CFStringCreateSubstring(CFStringRef text, CFIndex sta
return substring;
}
+#if ENABLE_UNUSED_CODE
CFRange diff_RightSubstringRange(CFIndex text_length, CFIndex new_length) {
CFRange substringRange = {
.length = new_length,
.location = text_length - new_length,
};
return substringRange;
}
+#endif
CFStringRef diff_CFStringCreateRightSubstring(CFStringRef text, CFIndex text_length, CFIndex new_length) {
return diff_CFStringCreateSubstring(text, text_length - new_length, new_length);
}
+#if ENABLE_UNUSED_CODE
CFRange diff_LeftSubstringRange(CFIndex new_length) {
CFRange substringRange = {
.length = new_length,
.location = 0,
};
return substringRange;
}
+#endif
CFStringRef diff_CFStringCreateLeftSubstring(CFStringRef text, CFIndex new_length) {
return diff_CFStringCreateSubstring(text, 0, new_length);

0 comments on commit c89be3a

Please sign in to comment.