fix(cpim-parser): coding style, use C++ style, not C

This commit is contained in:
Ronan Abhamon 2018-04-18 15:12:53 +02:00
parent e220d2ef80
commit 76dd2cce75

View file

@ -237,17 +237,17 @@ public:
Cpim::Parser::Parser () : Singleton(*new ParserPrivate) {
L_D();
#if TARGET_OS_IPHONE
CFBundleRef bundle = CFBundleGetBundleWithIdentifier( CFSTR("org.linphone.linphone") );
CFURLRef grammar_url = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), NULL, NULL);
CFStringRef grammar_path = CFURLCopyFileSystemPath(grammar_url, kCFURLPOSIXPathStyle);
CFStringEncoding encoding_method = CFStringGetSystemEncoding();
const char *path = CFStringGetCStringPtr(grammar_path, encoding_method);
CFRelease(grammar_url);
CFRelease(grammar_path);
#else
const char *path = CPIM_GRAMMAR;
#endif
#if TARGET_OS_IPHONE
CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("org.linphone.linphone"));
CFURLRef grammarUrl = CFBundleCopyResourceURL(bundle, CFSTR(CPIM_GRAMMAR), nullptr, nullptr);
CFStringRef grammarPath = CFURLCopyFileSystemPath(grammarUrl, kCFURLPOSIXPathStyle);
CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
const char *path = CFStringGetCStringPtr(grammarPath, encodingMethod);
CFRelease(grammarUrl);
CFRelease(grammarPath);
#else
const char *path = CPIM_GRAMMAR;
#endif
d->grammar = belr::GrammarLoader::get().load(path);
if (!d->grammar)
lFatal() << "Unable to load CPIM grammar.";