- Move from blenkernel to the node editor, the only place it was used
- Use two vectors instead of ListBase
- Remove define for validating the clipboard, which shouldn't be skipped
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
| source/blender/editors/space_node/clipboard.cc | ||
|---|---|---|
| 40 | Use the Construct on First Use idiom for all static variables that might use the guarded allocator, i.e. put this into a function that returns the clipboard reference. | |
| 42 | Looks like this method and the once below might make sense as methods on the clipboard? | |
| 60 | Since you are changing the code a fair amount (more than just moving it around), you should also improve the comment style imo. | |
Comment Actions
Thanks for the comments!
- Use construct on first use pattern
- Move functions to class methods
- Some further cleanup: Use references, comment style
| source/blender/editors/space_node/clipboard.cc | ||
|---|---|---|
| 51 | I added a bit more info, from what I could tell. It seems wrong to me honestly, it sets library_name but it doesn't use the value. But that's what it did before, and I don't really want to get into it right now. | |
Comment Actions
- Fix crash on exit
- Add more info to comment
- Add static to function
- Remove "b" prefix on clipboard struct
| source/blender/editors/space_node/clipboard.cc | ||
|---|---|---|
| 64 | This check doesn't make sense because it will be non-null even if G_MAIN is null. | |