Skip to content

For ARC Optimizing and Analized Build warning #3

Description

@nidamanx

Changed as you can see in these lines.
Is It Fine?

//
// base64EncodedString
//
// Creates an NSString object that contains the base 64 encoding of the
// receiver's data. Lines are broken at 64 characters long.
//
// returns an autoreleased NSString being the base 64 representation of the
// receiver.
//

  • (NSString *)base64EncodedString
    {
    size_t outputLength;
    char *outputBuffer = NewBase64Encode([self bytes], [self length], true, &outputLength);

    // Delete the Autorelease in ORIG
    NSString *result = [[NSString alloc]
    initWithBytes:outputBuffer
    length:outputLength
    encoding:NSASCIIStringEncoding];
    free(outputBuffer);
    return result;
    }

// added by Hiroshi Hashiguchi

  • (NSString *)base64EncodedStringWithSeparateLines:(BOOL)separateLines
    {
    // ORIG size_t outputLength;
    size_t outputLength = 0;
    char *outputBuffer = NewBase64Encode([self bytes], [self length], separateLines, &outputLength);

    // Delete the Autorelease in ORIG
    NSString *result = [[NSString alloc]
    initWithBytes:outputBuffer
    length:outputLength
    encoding:NSASCIIStringEncoding];
    free(outputBuffer);
    return result;
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions