git repos / blockattack-game

commit ff33341c

sago007 · 2018-03-26 16:03
ff33341cbf79fb20796ccb313e613eb83988ecd5 patch · browse files
parent d8a5a6f4a18178187ac337640fa9c62b0a61880d

Mixed the operator and copy contructor. This should be better.

Changed files

M source/code/sago/SagoTextField.cpp before
diff --git a/source/code/sago/SagoTextField.cpp b/source/code/sago/SagoTextField.cpp index 7add13a..578ec0c 100644 --- a/source/code/sago/SagoTextField.cpp +++ b/source/code/sago/SagoTextField.cpp
@@ -84,7 +84,7 @@ SagoTextField::SagoTextField(SagoTextField&& o) noexcept {
}
SagoTextField& SagoTextField::operator=(const SagoTextField& base) {
- data = new SagoTextFieldData();
+ ClearCache();
try {
*data = *(base.data);
//Copy all data but do not reuse the cache as it would result in a double free