forked from sunyu/CubismFramework
Fix implementation of iterator#increment in csmmap and csmvector
parent
3b711b8a80
commit
ad93d1370d
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix implementation of `iterator#increment` in `csmmap` and `csmvector`.
|
||||
|
||||
|
||||
## [4-r.1] - 2020-01-30
|
||||
|
||||
### Added
|
||||
|
@ -20,4 +27,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
* Reformat code using Prettier and ESLint.
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/Live2D/CubismWebFramework/compare/4-r.1...HEAD
|
||||
[4-r.1]: https://github.com/Live2D/CubismWebFramework/compare/ce2585a919ac6e99f64dd468933772c6f1abbcc7...4-r.1
|
||||
|
|
|
@ -272,9 +272,7 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
public increment(): iterator<_KeyT, _ValT> {
|
||||
const iteold = new iterator<_KeyT, _ValT>(this._map, this._index++); // 古い値を保存
|
||||
this._map = iteold._map;
|
||||
this._index = iteold._index;
|
||||
return this;
|
||||
return iteold;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -303,10 +303,8 @@ export namespace Live2DCubismFramework {
|
|||
* 後置き++演算子
|
||||
*/
|
||||
public increment(): iterator<T> {
|
||||
const iteold = new iterator<T>(this._vector, this._index++);
|
||||
this._vector = iteold._vector;
|
||||
this._index = iteold._index;
|
||||
return this;
|
||||
const iteold = new iterator<T>(this._vector, this._index++); // 古い値を保存
|
||||
return iteold;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -314,9 +312,7 @@ export namespace Live2DCubismFramework {
|
|||
*/
|
||||
public decrement(): iterator<T> {
|
||||
const iteold = new iterator<T>(this._vector, this._index--); // 古い値を保存
|
||||
this._vector = iteold._vector;
|
||||
this._index = iteold._index;
|
||||
return this;
|
||||
return iteold;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue