Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For ARC Optimizing and Analized Build warning #3

Open
nidamanx opened this issue Oct 9, 2012 · 0 comments
Open

For ARC Optimizing and Analized Build warning #3

nidamanx opened this issue Oct 9, 2012 · 0 comments

Comments

@nidamanx
Copy link

nidamanx commented Oct 9, 2012

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;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant