Comments (1)
This is very much by design. The typical case where I see this being used would be on const
objects, where you can't use a mutator method. Modifying the method would make it impossible to use on such objects. For this case, it wouldn't be appropriate to provide const and mutable overloads, since that would make it very easy to modify an object by accident when you wanted a modified copy. You'd have to use const_cast
or assign to const &
variables to control which method was selected.
If we implement #704, it would be very easy to translate a Rectangle
in-place without method support, since you'd have direct access to a Point
object for the origin. I think that would be the better way to go about providing mutable translate support.
From an efficiency perspective, I doubt there is much difference either way. Rectangle
is a fairly small and cheap object to create. I think the main concern here is usability and correctness, and that's going to depend on context.
from nas2d-core.
Related Issues (20)
- Cross platform builds with Clang
- Update `Delegate` and `Signal` for lambdas HOT 5
- Arch Linux compile error HOT 2
- Remove `argv_0` from `Filesystem` constructor
- Fix test-graphics `uniform_int_distribution` template parameter HOT 1
- Update MacOS build image HOT 1
- Re-evaluate MacOS support...? HOT 5
- Use config specific intermediate folders with `make` HOT 1
- Refactor MSVC project files HOT 1
- Fix debug builds of unit test project HOT 4
- Re-introduced audio bug HOT 4
- Fix `vcpkg` caching on CI HOT 1
- Remove Resource names HOT 1
- Remove Doxygen comments on private class fields HOT 1
- Improve `makefile` project semantics HOT 3
- Use Response Files for `make` builds
- Pulled latest, vcpkg fails to build HOT 2
- `EventHandler` key modifier checks should be `static`
- Update Visual Studio solution and projects to Visual Studio 2022 HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nas2d-core.