Browse Source

Added dataNoCpyForColumnIndex, so you can use that insted of dataNoCopyForColumnIndex, and the static analyzer won't chastise you.

August Mueller 15 years ago
parent
commit
94c2932603
2 changed files with 13 additions and 0 deletions
  1. 5 0
      src/FMResultSet.h
  2. 8 0
      src/FMResultSet.m

+ 5 - 0
src/FMResultSet.h

@@ -67,6 +67,11 @@ If you don't, you're going to be in a world of hurt when you try and use the dat
 - (NSData*) dataNoCopyForColumn:(NSString*)columnName;
 - (NSData*) dataNoCopyForColumnIndex:(int)columnIdx;
 
+// $#!@#!@ static analyzer doesn't like "copy" in the method name.  even if it's NOCOPY.  So these
+// do the exact same thing as the above methods, but without a clang warning.
+- (NSData*) dataNoCpyForColumn:(NSString*)columnName;
+- (NSData*) dataNoCpyForColumnIndex:(int)columnIdx;
+
 - (BOOL) columnIndexIsNull:(int)columnIdx;
 - (BOOL) columnIsNull:(NSString*)columnName;
 

+ 8 - 0
src/FMResultSet.m

@@ -263,6 +263,14 @@ - (NSData*) dataNoCopyForColumnIndex:(int)columnIdx {
     return data;
 }
 
+// $#!@#!@ static analyzer doesn't like "copy" in the method name.  even if it's NOCOPY
+- (NSData*) dataNoCpyForColumn:(NSString*)columnName {
+    return [self dataNoCopyForColumn:columnName];
+}
+
+- (NSData*) dataNoCpyForColumnIndex:(int)columnIdx {
+    return [self dataNoCopyForColumnIndex:columnIdx];
+}
 
 - (BOOL) columnIndexIsNull:(int)columnIdx {
     return sqlite3_column_type(statement.statement, columnIdx) == SQLITE_NULL;