Commit Graph

5 Commits

Author SHA1 Message Date
Hans Goudey 3759fb6e56 Cleanup: Move, copy construction and assignment to AssetWeakReference
Complete the rule of 5 for the asset weak reference class and remove
a separate copy function. While adding RAII behavior to a DNA struct
directly isn't so common, this seems better than doing it half-way.
2024-02-21 10:45:24 -05:00
Hans Goudey 8ab23f0a6e Assets: Return weak reference by value from asset representation
This is generally more flexible and less error prone. The struct
implements a proper descructorfor this anyway. That also makes the
separate free function unnecessary-- it's redundant with the destructor.
2024-02-16 12:02:08 -05:00
Hans Goudey d6cfd7d1f4 Cleanup: Remove unnecessary keywords from C++ headers
- Remove unnecessary `struct`
- Use `using` instead of `typedef`
- Remove `void` from `(void)` as function arguments
2024-01-04 15:07:48 -05:00
Hans Goudey f27aee857b Cleanup: Remove unnecessary keywords from newly C++ headers 2023-11-16 12:00:26 +01:00
Hans Goudey 3d57bc4397 Cleanup: Move several blenkernel headers to C++
Mostly focus on areas where we're already using C++ features,
where combining C and C++ APIs is getting in the way.

Pull Request: https://projects.blender.org/blender/blender/pulls/114972
2023-11-16 11:41:55 +01:00