Weiyi Wang
f409342ab5
Merge pull request #4613 from BreadFish64/gles5
...
video_core: add GLES support
2019-02-17 15:44:39 -05:00
fearlessTobi
70653c6a87
citra_qt/config: actually save name of input profile
...
Fixes the issue where all input profiles had the name "default" after restarting Citra.
2019-02-16 21:41:51 +01:00
fearlessTobi
931895d9b0
citra_qt: when opnening a cia file directly, make Citra ask to install it
2019-02-16 17:18:19 +01:00
Lioncash
3bc78e577f
threadsafe_queue: Remove NeedSize template parameter
...
The necessity of this parameter is dubious at best, and in 2019 probably
offers completely negligible savings as opposed to just leaving this
enabled. This removes it and simplifies the overall interface.
2019-02-15 22:00:44 +01:00
BreadFish64
d3d53bae83
common: decouple getting and setting user paths
...
paths -> g_paths
2019-02-15 14:48:31 -06:00
Weiyi Wang
e6feef96c1
Service: clear IPC header for unimplemented function stub
2019-02-14 22:16:50 -05:00
Weiyi Wang
3f86be88f0
HLE/IPC: pass in kernel & memory reference from parent to avoid global state reference
2019-02-14 22:09:25 -05:00
Weiyi Wang
0a424b86d2
ServerSession: replace GetPointer with block copy for HLE translation
...
Do it in the same way as HLERequestContext::SleepClientThread callback and avoid unsafe GetPointer
2019-02-14 22:09:25 -05:00
Weiyi Wang
36c8e1d7a9
HLE/IPC: move command buffer translation into kernel as TODO says
2019-02-14 22:09:25 -05:00
Weiyi Wang
4d10a2d652
tests/audio_core: remove hack for system objects
2019-02-14 14:08:45 -05:00
Weiyi Wang
64f6e5e597
ARM: pass MemorySystem separately in the constructor and make System optional
...
So that unit test can test CPU without constructing the entire system. Also remove hacks in the System class
2019-02-14 14:04:46 -05:00
Weiyi Wang
9573ee46bd
Memory: replace Core::CPU
2019-02-14 14:04:46 -05:00
Weiyi Wang
5f6d9f1915
Kernel/IPC: use MemorySystem from parameter
2019-02-14 14:04:46 -05:00
Weiyi Wang
20f47583f6
Kernel: replace usage of Core::System::GetInstance().PrepareReschedule() with callback
2019-02-14 14:04:46 -05:00
Weiyi Wang
eb050b8403
Kernel: replace usage of Core::System::GetInstance()::Timing()
2019-02-14 14:04:46 -05:00
Weiyi Wang
276ca88c9e
kernel/thread: replace usage of Core::CPU()
2019-02-14 14:04:46 -05:00
Weiyi Wang
b9f6bd9278
ldr_ro: replace usage of Core::CPU()
2019-02-14 14:04:46 -05:00
Weiyi Wang
de1128c60d
Merge pull request #4628 from FearlessTobi/backport-some-stuff
...
Backport various minor frontend review changes from yuzu and port minor PR from yuzu
2019-02-14 11:45:27 -05:00
Weiyi Wang
4b2397aa77
Merge pull request #4633 from BreadFish64/fully-invalid
...
video_core: improve efficiency of CachedSurface::IsSurfaceFullyInvalid
2019-02-14 11:44:46 -05:00
Weiyi Wang
8f2c35d7b6
Merge pull request #4614 from wwylele/nwm-uds-global
...
NWM_UDS: move states into the class
2019-02-14 11:44:28 -05:00
Weiyi Wang
1f38c53d8f
Merge pull request #4508 from B3n30/dsp_aac
...
CoreAudio::HLE: Add FFmpeg/WMF AAC decoder
2019-02-14 11:44:09 -05:00
liushuyu
a4ba35fe3a
audio_core: hle: mf: lint
2019-02-13 15:15:11 -07:00
liushuyu
671ac441e9
audio_core: hle: mf: move transform initializer to ctor
2019-02-13 14:32:14 -07:00
liushuyu
6178cc08b7
audio_core: hle: mf: conform to RAII as possible
2019-02-13 14:08:34 -07:00
ReinUsesLisp
fc6e33d812
video_core: Sort predicate order to have semantically positive value first
2019-02-13 21:06:37 +01:00
fearlessTobi
e5495e541d
citra_qt/config: backport minor changes from yuzu
2019-02-13 21:06:37 +01:00
fearlessTobi
59dbc72e7b
configure_dialog: backport minor changes from yuzu
2019-02-13 21:06:24 +01:00
SachinVin
d63acfc1e9
video_core: add workarounds to enable GLES support
...
video_core: shorten GetGLSLVersionString
video_core: make GLES version and extensions consistent
video_core: move some logic to LoadShader
video_core: deduplicate fragment shader precision specifier
2019-02-12 16:57:18 -06:00
zhupengfei
1995e8ff32
service/soc_u: address review comments
2019-02-10 18:49:18 +08:00
liushuyu
f0e041e27a
audio_core: hle: mf: correctly handle stream change
2019-02-09 16:49:48 -07:00
BreadFish64
d90f733330
video_core: improve efficiency of CachedSurface::IsSurfaceFullyInvalid
2019-02-09 17:33:18 -06:00
liushuyu
01e0902fa4
audio_core: hle: mf: fix a memory accessing issue
2019-02-09 13:55:54 -07:00
liushuyu
6281660844
audio_core: hle: mf: address yet another batch of reviews
2019-02-09 13:55:42 -07:00
Tobias
1f31f23b33
Merge pull request #4631 from tgsm/game-list-demos
...
citra_qt: show demos on game list
2019-02-09 14:15:59 +01:00
zhupengfei
08bf899d70
service/soc_u: Implement getaddrinfo and getnameinfo
2019-02-09 20:12:09 +08:00
liushuyu
ab1f47ed15
audio_core: hle: mf: make DetectMediaType return a struct
2019-02-09 11:57:36 +01:00
liushuyu
168f2ee79a
audio_core: mf: make initialize function return smart pointer
2019-02-09 11:57:36 +01:00
liushuyu
c91f5029ff
audio_core: hle: mf: fix a regression...
...
... where the sample copying logic is incorrect due to the wrong usage
of `std::array`
2019-02-09 11:57:36 +01:00
liushuyu
6332e57069
audio_core: hle: mf: return values as std::optional
2019-02-09 11:57:36 +01:00
liushuyu
25fa10327b
audio_core: hle: mf: use object proxy
2019-02-09 11:57:36 +01:00
liushuyu
26b3b41788
audio_core: hle: mf: wrap enum in class
2019-02-09 11:57:36 +01:00
liushuyu
633f02b9b2
audio_core: hle: mf: avoid name conflicts
2019-02-09 11:57:36 +01:00
liushuyu
452ac7b874
audio_core: hle: mf: use more enum
2019-02-09 11:57:36 +01:00
liushuyu
be764e4f88
audio_core: hle: mf: multiple fixes...
...
... more smart pointers and re-arrange code
2019-02-09 11:57:36 +01:00
liushuyu
4bc6bfd51f
audio_core: hle: mf: re-arrange comments
2019-02-09 11:57:36 +01:00
liushuyu
972b527374
audio_core: hle: mf: cleanup headers
2019-02-09 11:57:36 +01:00
liushuyu
2c40ef2a90
audio_core: hle: mf: rename functions
2019-02-09 11:57:36 +01:00
liushuyu
ea8a1f8754
Media Foundation Memory Fix
...
* audio_core: hle: mf: more smart pointers
* audio_core: hle: mf: fix memory leaks
* audio_core: hle: mf: even more smart pointers
2019-02-09 11:57:36 +01:00
liushuyu
10f876653d
audio_core: hle: mf: transition to use smart pointers
2019-02-09 11:56:51 +01:00
liushuyu
bee5ba3e33
audio_core: hle: mf: fix a regression...
...
... an introduction in 8f591d3b85714383196fd21e744a7eed5302ff0a
2019-02-09 11:56:51 +01:00
liushuyu
06316be8a7
audio_core: hle: mf: minor fix
2019-02-09 11:56:51 +01:00
liushuyu
c03861c2d9
audio_core: hle: mf: address another batch of reviews from @B3N30
2019-02-09 11:56:51 +01:00
liushuyu
7f5b54fda4
audio_core: hle: mf: address reviews from @B3N30
2019-02-09 11:56:51 +01:00
liushuyu
11e277149c
audio_core: hle: fix compile
2019-02-09 11:56:51 +01:00
B3N30
80b4dd21d2
audio_core: dsp_hle: add Media Foundation decoder...
...
* appveyor: switch to Media Foundation API
* Travis CI MinGW build needs an update with the container image
2019-02-09 11:56:51 +01:00
B3N30
1581dea6de
more reviews addressed
2019-02-09 11:55:12 +01:00
liushuyu
8fe3e37df5
audio_core: fix msvc include issue
2019-02-09 11:55:12 +01:00
B3N30
bd9984b5f8
Addressed reviews
2019-02-09 11:55:12 +01:00
B3N30
847003cc1c
FFmpegDL: Added external_dlls folder to user folder
...
AACDecoder: addressed reviews
2019-02-09 11:52:31 +01:00
B3N30
45b5de7a18
Fixup: Merge conflict with dsp lle
2019-02-09 11:52:31 +01:00
B3N30
c521f3b7d6
CoreAudio::HLE: Add FFmpeg aac decoder
2019-02-09 11:52:31 +01:00
tgsm
ee0afb4318
citra_qt: show demos on game list
2019-02-08 19:04:05 -05:00
Weiyi Wang
bf1dbb47dc
Merge pull request #4619 from wwylele/shadow-explosion
...
gl_rasterizer: change shadow_texture_bias from shader config to shader uniform
2019-02-08 18:38:40 -05:00
Weiyi Wang
687fa0134d
Merge pull request #4609 from wwylele/nuke-zmq
...
Reimplement scripting over plain UDP
2019-02-08 18:38:21 -05:00
Weiyi Wang
7074dab2da
Memory: don't lock hle mutex in memory read/write
...
The comment already invalidates itself: neither MMIO nor rasterizer cache belongsHLE kernel state. This mutex has a too large scope if MMIO or cache is included, which is prone to dead lock when multiple thread acquires these resource at the same time. If necessary, each MMIO component or rasterizer should have their own lock.
2019-02-08 10:43:06 -05:00
fearlessTobi
6be1b4d293
renderer_base: backport minor changes from yuzu
2019-02-06 17:16:27 +01:00
Weiyi Wang
f620c862f3
Merge pull request #4437 from adityaruplaha/hotkey-config-squashed
...
citra-qt: Make hotkeys configurable via the GUI (Attempt 2)
2019-02-03 21:57:34 -05:00
BreadFish64
cd21abe50f
sdl: add GLES support
2019-02-03 15:58:09 -06:00
Weiyi Wang
a6d9baa05a
FS: pass down program ID for archive operation
...
To eliminate System::GetInstance usage. Archive type like SelfNCCH and SaveData changes the actual reference path for different client, so archive backend interface should accept client information from the service interface. Currently we only pass the program ID as the client information.
2019-02-02 20:44:13 -05:00
Weiyi Wang
b5f2318ae7
gl_rasterizer: change shadow_texture_bias from shader config var to shader uniform
...
Games can frequently change this register. Using it as shader config var would generates a lot of shaders
2019-02-02 20:40:08 -05:00
Weiyi Wang
008197a569
Remove scripting switch in cmake
2019-02-02 15:25:23 -05:00
Weiyi Wang
6347b5cbb4
Remove libzmq submodule
2019-02-02 15:25:23 -05:00
Weiyi Wang
d765a73a53
Scripting: reimplement protocol over plan UDP using boost::asio
2019-02-02 15:25:23 -05:00
zhupengfei
433176a9b9
citra_qt: Implement UI for adding/editing/deleting cheats
...
The UI file is rewritten, to better make use of Qt's layouts (instead of depending on abstract geometry). "Add Cheat", "Save", "Delete" buttons are also added.
The UI logic should be rather easy and usable (IMO), but the code may seem a bit dirty. If anyone has a better idea regarding UI logic design or code implementation, feel free to tell me about it.
2019-02-02 08:15:27 +08:00
zhupengfei
573036b38e
core/cheats: Add and change a few functions
...
Added a few interfaces for adding/deleting/replacing/saving cheats. The cheats list is guarded by a std::shared_mutex, and would only need a exclusive lock when it's being updated.
I marked the `Execute` function as `const` to avoid accidentally changing the internal state of the cheat on execution, so that execution can be considered a "read" operation which only needs a shared lock.
Whether a cheat is enabled or not is now saved by a special comment line `*citra_enabled`.
2019-02-02 08:15:23 +08:00
Weiyi Wang
2731437a17
Merge pull request #4583 from xperia64/screenshot_fix
...
citra_qt: Fix saving screenshot when no file extension is provided
2019-02-01 10:49:28 -05:00
Weiyi Wang
ae57d72b33
Merge pull request #4603 from DimitriPilot3/gdbstub-watchpoint-fix1
...
gdbstub: only let Execute breakpoints write/restore BKPT opcodes into memory
2019-02-01 10:49:09 -05:00
Weiyi Wang
f78512d6de
Merge pull request #4599 from wwylele/bitfield-endian
...
Common: make BitField endianness-aware
2019-02-01 10:48:56 -05:00
Weiyi Wang
6382d9bfc3
NWM_UDS: move states into the class
2019-01-31 15:42:45 -05:00
Weiyi Wang
3a7a686fa9
Kernel/SharedMemory: make owner_process a raw pointer
...
To break a circular reference formed by process->handle_table->shared_memory->process. Since SharedMemory uses its owner process in the destructor, which is not kept alive by SharedMemory any more, we need to make sure that the lifetime of process is longer than the shared memory. To partially resolve this, Process now explicitly releases shared memory first in its destructor. This is with the assumtion that there is no inter-process reference to shared memory on exit, which is not true when we introduce more multi-process emulation. A TODO is left there for this, as more RE needs to be done on how 3DS handles this situation
2019-01-29 11:18:51 -05:00
Weiyi Wang
104829ae58
remove all occurance of specifying endianness inside BitField
...
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)
BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-01-28 22:09:43 -05:00
Weiyi Wang
055b9513a3
common/bitfield: make it endianness-aware
2019-01-28 22:09:43 -05:00
Weiyi Wang
fa9d6b79f9
common/swap: remove default value for swap type internal storage
...
This is compromise for swap type being used in union. A union has deleted default constructor if it has at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer. In the use case of Bitfield, all variant members will be the swap type on endianness mismatch, which would all have non-trivial default constructor if default value is specified, and non of them can have member initializer
2019-01-28 22:09:43 -05:00
Weiyi Wang
985cd878e6
common/swap: use template and tag for LE/BE specification
...
The tag can be useful for other type-generic templates like BitFields to forward the endianness specification
2019-01-28 22:09:43 -05:00
Carl Kenner
602334cb1e
Fix mouse touchscreen in SBS 3D mode.
...
You can now click or drag on either eye's touchscreen.
2019-01-27 16:25:42 +10:30
Dimitri ALBORA
d388fe58f7
gdbstub: only let Execute breakpoints write/restore BKPT opcodes into target memory
2019-01-26 22:08:39 +01:00
fearlessTobi
24f966481f
dsp_interface: fix sound being played while volume is 0
...
According to documentation, if the argument of std::exp is zero, one is returned.
However we want the return value to be also zero in this case so no audio is played.
2019-01-26 14:53:58 +01:00
Adityarup Laha
80ebd75285
citra-qt: Add /default parsing for hotkeys. Also minor code cleanups.
2019-01-25 20:42:49 +05:30
Weiyi Wang
8b047a49ae
Merge pull request #4586 from xperia64/qt_color_button_fix
...
citra_qt: Use QPixmap/QIcon for background color selection button
2019-01-23 20:24:57 -05:00
Weiyi Wang
054a97c08b
Merge pull request #4579 from xperia64/3d_slider
...
Change 3D Slider in-game
2019-01-23 20:23:55 -05:00
Lioncash
306ce6416a
vfp_helper: Remove accidental use of the comma operator in vfp_single_unpack()
...
Makes the line of code slightly easier to read properly.
2019-01-22 18:30:34 -05:00
Lioncash
c1a066fa89
yuzu/configuration/configure_web: Remove an unused lambda capture
...
'this' isn't actually used within the lambda, since what we need
from the class is already assigned within the capture section of
the lambda.
2019-01-21 22:11:02 +01:00
Lioncash
b16445064b
yuzu/configuration/configure_web: Use an ellipsis with 'Verifying' text
...
It's a common UI pattern to use an ellipsis to indicate an ongoing
action, rather than just specifying the word by itself.
2019-01-21 22:10:56 +01:00
bunnei
efd5768398
Merge pull request #4457 from FearlessTobi/remove-vsync
...
citra_qt: Remove V-Sync option
2019-01-21 15:56:12 -05:00
xperia64
ce26de858a
Use QPixmap/QIcon for background color selection button
2019-01-20 22:09:23 -05:00
Adityarup Laha
71f36efd27
citra-qt: Use structured bindings where applicable in ConfigureHotkeys::applyConfiguration
. Fix a few minor issues.
...
* Address https://github.com/citra-emu/citra/pull/4437#discussion_r241380912
2019-01-20 16:14:07 +05:30
Adityarup Laha
dccd1664ad
citra-qt/configuration: Fix a weird issue where the tab UI disappears when language is changed.
2019-01-20 16:14:03 +05:30
Adityarup Laha
988acf588a
citra-qt: Add back missing hotkeys & conflict fixes.
...
* Also fixed a missing spacer in ConfigureGeneral.
2019-01-20 16:13:59 +05:30
Adityarup Laha
4309585623
citra-qt: Commented & documented code related to hotkeys as & when required.
2019-01-20 16:13:54 +05:30
Adityarup Laha
9615acb550
citra-qt: Fixed reloading hotkeys on-the fly.
2019-01-20 16:13:49 +05:30
Adityarup Laha
5fa25fcf13
citra-qt: Add base support for hotkey reconfiguration + UI (whole of PR citra-emu/citra#3786 )
...
* Adds a new Hotkeys tab in the Controls group.
* Right click to reconfigure.
* See the original PR for more details & screenshots.
2019-01-20 16:12:10 +05:30
xperia64
c6d623f4ba
Fix crash when no files are selected
2019-01-19 22:14:19 -05:00
xperia64
82acde7e4b
Add file extension to screenshot filename if not provided
2019-01-19 22:10:30 -05:00
Frederic Laing
5df6506e81
game_list: Remove a reference of a reference
2019-01-19 21:30:32 +01:00
Otávio Pace
6560fac5ff
audio_core: remove unnecessary spaces on comments
2019-01-19 21:28:52 +01:00
fearlessTobi
1302c9c1e7
frontend: Remove V-Sync option from UI
...
The V-Sync option is fundamentally broken in Citra, so let's do the same as yuzu and remove it entirely for SDL2 and at least from the frontend for QT.
(It was also only used by 7.3% of users)
2019-01-19 17:43:44 +01:00
xperia64
c1ac39f058
Actually fix the race condition
2019-01-18 16:32:16 -05:00
xperia64
5f5646c850
Fix types
2019-01-18 15:24:39 -05:00
xperia64
6f2eb2a418
Do 3D slider updating in the HID module
2019-01-17 23:48:50 -05:00
xperia64
81f4cef201
Revert "Change 3D slider in-game"
...
This reverts commit bb9a972e35
.
Needs to be completely redone in the HID HLE service module.
2019-01-17 23:33:24 -05:00
Weiyi Wang
95a57a2fe3
Merge pull request #4538 from valentinvanelslande/profiles
...
Add multiple input profile support
2019-01-17 22:32:24 -05:00
xperia64
bb9a972e35
Change 3D slider in-game
2019-01-17 22:18:15 -05:00
James Rowe
3523831195
Frontend: Only reload icons in chat when the chat room is open
2019-01-17 12:25:17 -07:00
James Rowe
f110cd95a6
Merge pull request #4569 from zhaowenlan1779/multiplayer-fix
...
multiplayer: minor UI fixes
2019-01-17 09:37:18 -07:00
zhupengfei
2d65371c20
citra_qt/multiplayer: Update themed icon on theme change
2019-01-16 22:01:21 +08:00
BreadFish64
ac3b514875
android: fix native library inclusion
2019-01-15 20:28:56 -06:00
BreadFish64
7b1cfff825
android: use better icons
...
vector assets are available
unfortunately android studio mutilates citra's vector icon
2019-01-15 20:28:29 -06:00
BreadFish64
d4646938e9
android: move cmakelist
2019-01-15 19:24:03 -06:00
zhupengfei
5f0dcd52ae
multiplayer: minor UI fixes
...
Just two minor fixes:
1. Font color is black in dark theme. It is now only black for pings.
2. If a user is called `abc`, you can ping them by `@abc_`. Now a ping only takes effect when there are spaces around it.
2019-01-13 22:21:04 +08:00
Ben
4f23d5d69e
Merge pull request #4490 from wwylele/teakra-new
...
audio: implement DSP LLE
2019-01-11 16:45:00 +01:00
Valentin Vanelslande
62b40e9155
Merge branch 'master' into profiles
2019-01-07 10:39:44 -05:00
Weiyi Wang
941d241e7d
Merge pull request #4537 from RicBent/master
...
Added Debug/GPIO14 Buttons
2019-01-07 10:07:31 -05:00
Weiyi Wang
895936360b
network: remove cpp-jwt library dependency
...
This is not used anywhere in in the module
2018-12-31 23:23:09 -05:00
Valentin Vanelslande
df02ea48d2
minor ui changes
2018-12-29 19:28:56 -05:00
Valentin Vanelslande
64b992487e
fix regression
2018-12-29 16:23:33 -05:00
Valentin Vanelslande
dce82fa005
move comment
2018-12-29 13:15:31 -05:00
Valentin Vanelslande
57f224fc50
fix clang-format
2018-12-29 09:31:03 -05:00
RicBent
707bc48440
Added new buttons to movie system
2018-12-29 08:19:59 -06:00
Valentin Vanelslande
3d00beb9d5
add a comment, rename old index
2018-12-29 09:19:45 -05:00
Valentin Vanelslande
e7b1a1d5c8
fix clang-format
2018-12-29 09:04:43 -05:00
Valentin Vanelslande
60d1822206
if to clamp
2018-12-29 08:39:30 -05:00
Valentin Vanelslande
5a14af5f38
address some comments
2018-12-29 08:27:06 -05:00
Pengfei Zhu
5a4c7c32d8
Update src/citra_qt/configuration/config.cpp
...
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-29 08:14:37 -05:00
Mat M
ec7a3fb72c
Update src/core/settings.h
...
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-28 23:33:40 -05:00
Valentin Vanelslande
8e614c3eb0
clang-format; address one comment
2018-12-28 23:31:55 -05:00
Weiyi Wang
fbd0944a5a
Merge pull request #4512 from FearlessTobi/port-1902
...
Port yuzu-emu/yuzu#1902 : "audio_core: Make g_sink_details internally linked"
2018-12-28 22:55:08 -05:00
Valentin Vanelslande
860860397b
more fixes
2018-12-28 21:26:50 -05:00
Valentin Vanelslande
39140bbff8
another fix
2018-12-28 21:24:01 -05:00
Valentin Vanelslande
16ebb38b4a
more fixes
2018-12-28 21:23:43 -05:00
Valentin Vanelslande
e420fb666f
another fix
2018-12-28 21:15:18 -05:00
Valentin Vanelslande
6d0c50dfec
more fixes
2018-12-28 21:14:44 -05:00
Valentin Vanelslande
bf93b94658
fixes
2018-12-28 21:13:57 -05:00
Mat M
90965525ac
Apply suggestions from code review
...
Co-Authored-By: valentinvanelslande <valentinvanelslandeacnl@gmail.com>
2018-12-28 21:00:09 -05:00
Valentin Vanelslande
7c95032e3a
Add multiple input profile support
...
Only supported in the Qt frontend.
2018-12-28 20:28:45 -05:00
RicBent
6ad609a539
Added GPIO14 button and UI config buttons
2018-12-28 17:13:37 -06:00
RicBent
7c007eac24
Fixed coding style
2018-12-28 15:13:16 -06:00
RicBent
446b614409
Removed unnecessary debug key abbreviations
2018-12-28 13:33:54 -06:00
RicBent
403d2f0058
Added Debug Button
2018-12-28 12:47:50 -06:00
Pengfei Zhu
3989c17cb0
Merge pull request #4531 from lioncash/mem
...
core/memory: Remove unnecessary memory zeroing in MemorySystem::Impl
2018-12-27 22:29:20 +08:00
Lioncash
432e847c24
core/memory: Remove unnecessary memory zeroing in MemorySystem::Impl
...
std::make_unique for arrays is equivalent to doing:
std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]())
(note the ending () after the array size specifier). This means that the
default value within memory for the constructed types will be whatever
the default constructor for that type does. Given the built-in
type for std::uint8_t doesn't have a constructor, this is equivalent to
forcing zero-initialization, so the memory will already be zeroed out on
construction. Because of that, there's no need to zero it out again.
2018-12-27 00:35:53 -05:00