mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 13:48:09 +00:00
fix(cpim-parser): coding style, use C++ style, not C
This commit is contained in:
parent
e220d2ef80
commit
76dd2cce75
1 changed files with 11 additions and 11 deletions
|
|
@ -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.";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue