Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit725b4cc

Browse files
author
Travis Jeffery
committed
Merge pull request#101 from OpenFibers/master
Fixed a crash and a logic error, gitignore updated
2 parents6e6b30c +f9567fd commit725b4cc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ profile
1818
DerivedData
1919
*.hmap
2020
*.ipa
21+
project.xcworkspace
2122

2223
# CocoaPods
2324
Pods

‎ClangFormat/TRVSFormatter.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ - (void)formatDocument:(IDESourceCodeDocument *)document {
9595
[selfformatRanges:@[ [NSValuevalueWithRange:NSMakeRange(0, length)] ]
9696
inDocument:document];
9797

98-
NSUInteger diff =labs(length - [[documenttextStorage]length]);
98+
NSUInteger textStorageLength = [[documenttextStorage]length];
99+
NSUInteger diff =MAX(length, textStorageLength) -MIN(length, textStorageLength);
99100

100101
BOOL documentIsLongerAfterFormatting =
101102
length > [[documenttextStorage]length];
@@ -225,7 +226,9 @@ - (void)fragmentsOfContinuousLineRanges:(NSArray *)continuousLineRanges
225226
encoding:NSUTF8StringEncoding];
226227
outputPath = [outputPath
227228
stringByTrimmingCharactersInSet:[NSCharacterSetnewlineCharacterSet]];
228-
if ([outputPathlength]) {
229+
230+
BOOL isDirectory =NO;
231+
if ([[NSFileManagerdefaultManager]fileExistsAtPath:outputPathisDirectory:&isDirectory] && !isDirectory) {
229232
executablePath = outputPath;
230233
}
231234
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp