Skip to content

Commit cc2a3b3

Browse files
authored
chore: Change constexpr to obj-c NSNumber (#3646)
Fixes #3549 ## Description This PR replaces constexpr declaration with equivalent NSNumber declaration for default font sizes. We weren't able to reproduce the compilation error, but the change doesn't have a negative impact. ## Changes Replaced the default font size declarations. ## Test plan Have a header (regular, large) with some non-default font family (this triggers the font size check). Set a breakpoint in `RNSScreenStackHeaderConfig.mm:491` and `:519` and verify the constants are correct. ## Checklist - [ ] Ensured that CI passes
1 parent 0435e88 commit cc2a3b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ios/RNSScreenStackHeaderConfig.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
namespace react = facebook::react;
3939
#endif // RCT_NEW_ARCH_ENABLED
4040

41-
static constexpr auto DEFAULT_TITLE_FONT_SIZE = @17;
42-
static constexpr auto DEFAULT_TITLE_LARGE_FONT_SIZE = @34;
41+
static NSNumber *const DEFAULT_TITLE_FONT_SIZE = @17;
42+
static NSNumber *const DEFAULT_TITLE_LARGE_FONT_SIZE = @34;
4343

4444
#if !defined(RCT_NEW_ARCH_ENABLED)
4545
// Some RN private method hacking below. Couldn't figure out better way to access image data

0 commit comments

Comments
 (0)