Lioncash
ee687d2332
nvflinger: Emplace Display instances directly
...
We can use emplace_back to construct the Display instances directly,
instead of constructing them separately and copying them, avoiding the
need to copy std::string and std::vector instances that are part of the
Display struct.
2018-07-19 11:50:12 -04:00
bunnei
b4761e4751
Merge pull request #705 from lioncash/string-ref
...
file_util: return string by const reference for GetExeDirectory()
2018-07-19 08:47:06 -07:00
bunnei
5c7d5bf57d
Merge pull request #704 from lioncash/string
...
string_util: Remove AsciiToHex()
2018-07-19 08:46:40 -07:00
bunnei
bc13f2d4e3
Merge pull request #703 from lioncash/const
...
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
2018-07-19 08:46:15 -07:00
bunnei
b0d322e6cc
Merge pull request #702 from lioncash/initialize
...
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
2018-07-19 08:45:54 -07:00
bunnei
6a446c40d7
Merge pull request #701 from lioncash/moving
...
content_archive: Minor changes
2018-07-19 08:41:42 -07:00
Lioncash
e63ab8498e
nvdrv: Take std::string by const reference in GetDevice()
...
This is only ever used as a lookup into the device map, so we don't need to
take the std::string instance by value here.
2018-07-19 11:40:36 -04:00
Lioncash
31565ae556
hle_ipc: Amend usage of buffer_index within one of HLERequestContext's WriteBuffer() overloads
...
Previously, the buffer_index parameter was unused, causing all writes to
use the buffer index of zero, which is not necessarily what is wanted
all the time.
Thankfully, all current usages don't use a buffer index other than zero,
so this just prevents a bug before it has a chance to spring.
2018-07-19 11:10:16 -04:00
Lioncash
cc12330eca
fsp_srv: Remove unnecessary vector construction in IFile's Write() function
...
We can avoid constructing a std::vector here by simply passing a pointer
to the original data and the size of the copy we wish to perform to the
backend's Write() function instead, avoiding copying the data where it's
otherwise not needed.
2018-07-19 11:01:07 -04:00
Lioncash
45b3a5cceb
fsp_srv: Remove unnecessary std::vector construction in IDirectory's Read() function
...
We were using a second std::vector as a buffer to convert another
std::vector's data into a byte sequence, however we can just use
pointers to the original data and use them directly with WriteBuffer,
which avoids copying the data at all into a separate std::vector.
We simply cast the pointers to u8* (which is allowed by the standard,
given std::uint8_t is an alias for unsigned char on platforms that we
support).
2018-07-19 10:46:54 -04:00
bunnei
244e0768f9
Merge pull request #699 from lioncash/vfs
...
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
2018-07-19 07:38:45 -07:00
bunnei
66a5f60584
Merge pull request #697 from bunnei/disable-depth-cull
...
gl_state: Temporarily disable culling and depth test.
2018-07-19 07:38:00 -07:00
Lioncash
d56e2776f0
filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
...
Avoids unnecessary atomic reference count incrementing and decrementing
2018-07-19 10:34:11 -04:00
Lioncash
54494911b2
filesystem: Use std::string's empty() function instead of comparing against a literal
...
This is simply a basic value check as opposed to potentially doing
string based operations (unlikely, but still, avoiding it is free).
2018-07-19 10:32:23 -04:00
Lioncash
f7c16c4c85
filesystem: Remove pragma disabling global optimizations
...
This was just an artifact missed during PR review.
2018-07-19 10:30:53 -04:00
Lioncash
b771ce7cf3
fsp_srv: Make IStorage constructor explicit
...
Prevents implicit conversions.
2018-07-19 10:04:16 -04:00
Lioncash
b9936176cd
fsp_srv: Add missing includes
...
Gets rid of relying on indirect inclusions.
2018-07-19 10:03:17 -04:00
Lioncash
a97893f113
fsp_srv: Resolve sign-mismatch warnings in assertion comparisons
2018-07-19 09:58:32 -04:00
Lioncash
168caaa85b
fsp_srv: Respect write length in Write()
...
Previously we were just copying the data whole-sale, even if the length
was less than the total data size. This effectively makes the
actual_data vector useless, which is likely not intended.
Instead, amend this to only copy the given length amount of data.
At the same time, we can avoid zeroing out the data before using it by
passing iterators to the constructor instead of a size.
2018-07-19 09:57:48 -04:00
Lioncash
863fa140ec
common/swap: Remove unnecessary const on return value of swap()
2018-07-19 09:35:54 -04:00
Lioncash
57e94306c8
common/swap: Use static_cast where applicable
2018-07-19 09:35:13 -04:00
Lioncash
260f21e3a0
common/swap: Use using aliases where applicable
2018-07-19 09:32:13 -04:00
Lioncash
fd305e9ce1
common/common_funcs: Remove unused rotation functions
...
These are unused and essentially don't provide much benefit either. If
we ever need rotation functions, these can be introduced in a way that
they don't sit in a common_* header and require a bunch of ifdefing to
simply be available
2018-07-19 09:21:23 -04:00
Lioncash
ba64a9c48a
common/misc: Deduplicate code in GetLastErrorMsg()
...
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
2018-07-19 09:15:38 -04:00
Lioncash
bcfbb23926
externals: Update Xbyak to 5.65
...
Keeps the JIT assembler library up to date and ensures we don't run into
any issues that may have been resolved.
2018-07-19 08:38:07 -04:00
Lioncash
6884eca7e0
externals: Update catch to v2.2.3
...
Keeps the unit-testing library up to date.
2018-07-19 08:33:06 -04:00
Lioncash
72fd837475
file_util: return string by const reference for GetExeDirectory()
...
This disallows modifying the internal string buffer (which shouldn't be
modified anyhow).
2018-07-19 01:27:29 -04:00
bunnei
da557eaae0
Merge pull request #700 from bunnei/update-dynarmic
...
externals: Update dynarmic to 5a91c94.
2018-07-18 22:01:39 -07:00
Lioncash
eee3d88c4c
string_util: Remove AsciiToHex()
...
Easy TODO
2018-07-18 23:57:15 -04:00
bunnei
862263ddbb
Merge pull request #692 from lioncash/assign
...
address_arbiter: Correct assignment within an assertion statement in WakeThreads()
2018-07-18 20:56:28 -07:00
bunnei
d1e52e2b4e
Merge pull request #690 from lioncash/move
...
core/memory, core/hle/kernel: Use std::move where applicable
2018-07-18 20:55:55 -07:00
Lioncash
84998eb1bc
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
...
This function doesn't alter class state.
2018-07-18 23:50:07 -04:00
Lioncash
6b94683e8e
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
...
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.
While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
2018-07-18 23:45:22 -04:00
bunnei
3df9af8ab5
gl_state: Temporarily disable culling and depth test.
2018-07-18 23:21:43 -04:00
Lioncash
a1b892fbc3
content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference
...
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
2018-07-18 23:19:28 -04:00
Lioncash
3f121fab76
content_archive: Add missing standard includes
2018-07-18 23:18:59 -04:00
bunnei
3b550bb960
externals: Update dynarmic to 5a91c94.
2018-07-18 23:14:44 -04:00
Lioncash
845d2589e3
content_archive: std::move VirtualFile in NCA's constructor
...
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
2018-07-18 23:13:25 -04:00
Lioncash
743350e309
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
...
We can just use a generic lambda to avoid writing the same thing twice.
2018-07-18 23:03:27 -04:00
bunnei
744bd7aade
Merge pull request #691 from lioncash/guard
...
service/prepo: Add missing header guard
2018-07-18 19:46:14 -07:00
bunnei
c1b6e30636
Merge pull request #686 from lioncash/fmt
...
externals: update fmt to version 5.1.0
2018-07-18 19:44:44 -07:00
Lioncash
c8750356fd
loader/nro: Resolve sign mismatch warnings
2018-07-18 22:27:22 -04:00
Lioncash
d12631d7ef
loader/nso: Remove unnecessary vector resizes
...
We can just initialize these vectors directly via their constructor.
2018-07-18 22:26:41 -04:00
Lioncash
bb7d04285a
loader/nso: Resolve sign mismatch warnings
2018-07-18 22:26:37 -04:00
bunnei
c60f7700f9
Merge pull request #688 from lioncash/comma
...
vm_manager: Add missing commas to string literal array elements in GetMemoryStateName()
2018-07-18 18:59:09 -07:00
bunnei
fc31df58f1
Merge pull request #693 from lioncash/unused
...
core/memory: Remove unused function GetSpecialHandlers() and an unused variable in ZeroBlock()
2018-07-18 18:57:13 -07:00
bunnei
4d287c3155
Merge pull request #687 from lioncash/instance
...
core: Don't construct instance of Core::System, just to access its live instance
2018-07-18 18:55:58 -07:00
bunnei
f6f2356fcb
Merge pull request #680 from bunnei/fix-swizz
...
decoders: Fix calc of swizzle image_width_in_gobs.
2018-07-18 18:55:37 -07:00
bunnei
742c11a0f9
Merge pull request #685 from lioncash/build
...
hle/filesystem: Amend trace log in OpenSaveData() to compile in debug mode
2018-07-18 18:55:15 -07:00
bunnei
bf8b2e3f88
Merge pull request #684 from lioncash/nonmember
...
game_list: Make ContainsAllWords an internally linked non-member function
2018-07-18 18:55:00 -07:00