fbshipit-source-id: cad5f527363fe09c2eea5b05ce1f3f2ecb86941b

This commit is contained in:
Daniel Buchele
2018-06-12 11:42:02 -07:00
parent 1edffabd05
commit 28be3c7cd8
22 changed files with 208 additions and 148 deletions

View File

@@ -7,7 +7,8 @@
*/
#import "SonarCppBridgingConnection.h"
#import "SKUtils.h"
#import <FBCxxUtils/FBCxxFollyDynamicConvert.h>
#import "SonarCppBridgingResponder.h"
@implementation SonarCppBridgingConnection
@@ -27,7 +28,7 @@
- (void)send:(NSString *)method withParams:(NSDictionary *)params
{
conn_->send([method UTF8String], [SKUtils convertIdToFollyDynamic:params]);
conn_->send([method UTF8String], facebook::cxxutils::convertIdToFollyDynamic(params));
}
- (void)receive:(NSString *)method withBlock:(SonarReceiver)receiver
@@ -36,7 +37,7 @@
std::unique_ptr<facebook::sonar::SonarResponder> responder) {
SonarCppBridgingResponder *const objCResponder =
[[SonarCppBridgingResponder alloc] initWithCppResponder:std::move(responder)];
receiver([SKUtils convertFollyDynamicToId: message], objCResponder);
receiver(facebook::cxxutils::convertFollyDynamicToId(message), objCResponder);
};
conn_->receive([method UTF8String], lambda);
}