2016-05-02 09:57:04 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace nall {
|
|
|
|
|
|
|
|
template<typename T> vector<T>::vector(const initializer_list<T>& values) {
|
|
|
|
reserveRight(values.size());
|
|
|
|
for(auto& value : values) append(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> vector<T>::vector(const vector<T>& source) {
|
|
|
|
operator=(source);
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> vector<T>::vector(vector<T>&& source) {
|
|
|
|
operator=(move(source));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> vector<T>::~vector() {
|
|
|
|
reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> vector<T>::operator bool() const {
|
|
|
|
return _size;
|
|
|
|
}
|
|
|
|
|
2018-09-02 14:06:41 +00:00
|
|
|
template<typename T> vector<T>::operator array_span<T>() {
|
|
|
|
return {data(), size()};
|
|
|
|
}
|
|
|
|
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 06:49:54 +00:00
|
|
|
template<typename T> vector<T>::operator array_view<T>() const {
|
|
|
|
return {data(), size()};
|
|
|
|
}
|
|
|
|
|
2018-12-22 10:28:15 +00:00
|
|
|
template<typename T> template<typename Cast> auto vector<T>::capacity() const -> uint64_t {
|
2018-08-21 03:17:12 +00:00
|
|
|
return (_left + _size + _right) * sizeof(T) / sizeof(Cast);
|
2016-05-02 09:57:04 +00:00
|
|
|
}
|
|
|
|
|
2018-12-22 10:28:15 +00:00
|
|
|
template<typename T> template<typename Cast> auto vector<T>::size() const -> uint64_t {
|
2018-08-21 03:17:12 +00:00
|
|
|
return _size * sizeof(T) / sizeof(Cast);
|
2016-05-02 09:57:04 +00:00
|
|
|
}
|
|
|
|
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 06:49:54 +00:00
|
|
|
template<typename T> template<typename Cast> auto vector<T>::data() -> Cast* {
|
|
|
|
return (Cast*)_pool;
|
2016-05-02 09:57:04 +00:00
|
|
|
}
|
|
|
|
|
Update to v106r59 release.
byuu says:
Changelog:
- fixed bug in Emulator::Game::Memory::operator bool()
- nall: renamed view<string> back to `string_view`
- nall:: implemented `array_view`
- Game Boy: split cartridge-specific input mappings (rumble,
accelerometer) to their own separate ports
- Game Boy: fixed MBC7 accelerometer x-axis
- icarus: Game Boy, Super Famicom, Mega Drive cores output internal
header game titles to heuristics manifests
- higan, icarus, hiro/gtk: improve viewport geometry configuration;
fixed higan crashing bug with XShm driver
- higan: connect Video::poll(),update() functionality
- hiro, ruby: several compilation / bugfixes, should get the macOS
port compiling again, hopefully [Sintendo]
- ruby/video/xshm: fix crashing bug on window resize
- a bit hacky; it's throwing BadAccess Xlib warnings, but they're
not fatal, so I am catching and ignoring them
- bsnes: removed Application::Windows::onModalChange hook that's no
longer needed [Screwtape]
2018-08-26 06:49:54 +00:00
|
|
|
template<typename T> template<typename Cast> auto vector<T>::data() const -> const Cast* {
|
|
|
|
return (const Cast*)_pool;
|
2016-05-02 09:57:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|