Skip to content

fix: remove duplicate context->layoutDimensions init#558

Open
jsbrucker wants to merge 1 commit into
nicbarker:mainfrom
jsbrucker:RedundantDimensions
Open

fix: remove duplicate context->layoutDimensions init#558
jsbrucker wants to merge 1 commit into
nicbarker:mainfrom
jsbrucker:RedundantDimensions

Conversation

@jsbrucker

Copy link
Copy Markdown

Summary

Removing a redundant property initialization, layoutDimensions was already set to the same value on line 4054.

Validation

I have run cmake . followed by make locally and confirmed everything builds with no new warnings. The only existing warning is:

[  0%] Building C object examples/clay-official-website/CMakeFiles/clay_official_website.dir/main.c.o
~/dev/clay/examples/clay-official-website/main.c: In function ‘HandleRendererButtonInteraction’:
~/dev/clay/examples/clay-official-website/main.c:237:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  237 |         ACTIVE_RENDERER_INDEX = (uint32_t)userData;
      |                                 ^

As a low effort sanity check, I have also run ./examples/terminal-example/clay_examples_terminal with and without the change to see that there are no obvious differences.
Please provide guidance if there is some test command I can/should be running, I didn't see any but I don't normally use cmake so it is likely I missed something.

Comment thread clay.h
.maxElementCount = oldContext ? oldContext->maxElementCount : Clay__defaultMaxElementCount,
.maxMeasureTextCacheWordCount = oldContext ? oldContext->maxMeasureTextCacheWordCount : Clay__defaultMaxMeasureTextWordCacheCount,
.errorHandler = errorHandler.errorHandlerFunction ? errorHandler : CLAY__INIT(Clay_ErrorHandler) { Clay__ErrorHandlerFunctionDefault, 0 },
.layoutDimensions = layoutDimensions,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Here is where layoutDimensions was already set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant