Skip to content

Commit 9d33e13

Browse files
author
WinterPu
committed
bugfix: delegate for uint64_t && CBExecutor addDynamic target cb function cannot have return value
1 parent ab011e6 commit 9d33e13

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

docs/src/BlueprintGeneration/BPGen-TypeConversion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030

31-
### CBExecutor:
31+
### CBExecutor: 就是CBExecutor 本身不能有return value 因为DECALRE_DYNAMIC_MULTICAST_DELEGATE 生成的函数就没有return 值
3232
OnLocalAudioSpectrum.AddDynamic(Executor, &UAgoraBPuAudioSpectrumObserverCBExecutor::OnLocalAudioSpectrum);
3333
OnLocalAudioSpectrum 本身会有return value
3434
AddDynamic 的绑定无法有return value

parsers/config/blueprint/remove_node_list.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,5 @@ module.exports = [
198198
'agora::media::IAudioSpectrumObserver',
199199
'agora::media::IVideoEncodedFrameObserver',
200200
'agora::media::IFaceInfoObserver',
201+
'agora::rtc::IMetadataObserver',
201202
];

renders/utility/blueprint_special/bptype_data_conv.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export type UEBPTypeConvData = {
2121
// skip the process, directly assigned the type source
2222
bpDesignedTypeSource: string | undefined;
2323
// whether the implementation is user provided. (not the native blueprint type)
24+
bpDesignedTypeDelegate: string | undefined;
2425
isCustomBPType: boolean;
2526

2627
// [Step 1]: Basic Conversion: (Directly Type Conversion: Cpp <-> BP)
@@ -335,6 +336,7 @@ const defaultTmpl_BasicType_NoConv: UEBPTypeConvData = {
335336
bpTypeName: '',
336337
bpDesignedDeclType: undefined,
337338
bpDesignedTypeSource: undefined,
339+
bpDesignedTypeDelegate: undefined,
338340
isCustomBPType: false,
339341
convFromCpp: {
340342
convFuncType: ConversionWayType.NoNeedConversion,
@@ -607,6 +609,11 @@ export const map_bptype_conv_data: { [type_source: string]: UEBPTypeConvData } =
607609
'uint64_t': {
608610
...defaultTmpl_BasicType_NoConv,
609611
bpTypeName: 'FString',
612+
// TBD(WinterPu)
613+
// in OnStreamMessage, uint64_t sentTs -> FString sentTs
614+
// because DECLARE_DYNAMIC_MULTICAST_DELEGATE_XXX would always gen FString to const FString &
615+
bpDesignedTypeDelegate: 'const FString &',
616+
bpDesignedTypeSource: 'const FString &',
610617
defaultValue: '0',
611618
convFromCpp: {
612619
convFuncType: ConversionWayType.BasicConvFunc,

renders/utility/blueprint_special/bptype_helper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ export function convertToBPType(
578578
}
579579

580580
let tmpDeclType = tmpTypeSource;
581-
let tmpDelegateType = tmpTypeSource;
581+
let tmpDelegateType =
582+
data_bptype_conv?.bpDesignedTypeDelegate ?? tmpTypeSource;
582583

583584
// is_const / isOutput
584585
// TBD(WinterPu)

0 commit comments

Comments
 (0)