Lioncash
bc7bfd96f0
logging/backend: Use const reference to refer to log filter
The filter is returned via const reference, so this was making a
pointless copy of the entire filter every time a message was being
pushed into the logger instance.
7 years ago
Lioncash
11470f331a
thread_queue_list: Make contains() and get_first() const member functions
These don't directly modify the contained data.
7 years ago
Lioncash
55c73e10a7
thread_queue_list: Convert typedef to a type alias
7 years ago
Zach Hilman
2b6128fe0b
file_util: Use enum instead of bool for specifing path behavior
7 years ago
Zach Hilman
3f82dad1e4
file_util: Add platform-specific slash option to SanitizePath
8 years ago
Lioncash
6e90f0bf6a
common/logging: Add missing service log categories
These weren't added when the services were introduced.
7 years ago
Lioncash
5a9c00ea04
common/color: Remove unnecessary const qualifiers on return types
These are just superfluous and not necessesary
7 years ago
Lioncash
76197a4be9
common/color: Get rid of undefined behavior
Gets rid of type punning via reinterpret_cast within functions. Instead,
we use memcpy to transfer the contents across types.
7 years ago
Lioncash
cc9d7bbf01
vector_math: Use variable template version of is_signed in Vec classes
Same behavior, less code
7 years ago
Lioncash
766c1a2d50
vector_math: Remove unimplemented function prototypes
7 years ago
Lioncash
5c323d96e0
vector_math: Make functions constexpr where applicable
7 years ago
Lioncash
4e3bc37791
vector_math: Convert typedefs to type aliases
7 years ago
Lioncash
a7d6efc520
common: Convert type traits templates over to variable template versions where applicable
Uses the C++17 inline variable variants
7 years ago
Lioncash
0735a0c8a1
file_util: Avoid sign-conversions in WriteArray() and ReadArray()
Prevents compiler warnings.
7 years ago
Lioncash
45bc449ff9
service: Add usb services
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
7 years ago
Lioncash
de72956181
service: Add arp services
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
8 years ago
Lioncash
f2a03468b1
math_util: Always initialize members of Rectangle
Prevents potentially using the members uninitialized.
8 years ago
Lioncash
7469e26e5e
service: Add migration services
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
8 years ago
Lioncash
42c5171322
logging/log: Remove incorrect description in PCV doc comment
PCV isn't the parental control service.
8 years ago
Lioncash
5233040ab4
service: Add psc services
Adds the basic skeleton for the psc services based off the information
provided by Switch Brew.
8 years ago
Lioncash
e39294c267
service: Add capture services
Adds the basic skeleton for the capture services based off information
provided by Switch Brew.
8 years ago
Lioncash
d109279543
service: Add bpc and pcv services
Adds the basic skeleton for the remaining pcv-related services based off
information on Switch Brew.
8 years ago
Zach Hilman
150527ec19
Allow key loading from %YUZU_DIR%/keys in addition to ~/.switch
8 years ago
Zach Hilman
cc8234fa89
Use SHGetKnownFolderPath instead of SHGetFolderPathA
8 years ago
Zach Hilman
22342487e8
Extract mbedtls to cpp file
8 years ago
Zach Hilman
df5b75694f
Remove files that are not used
8 years ago
Lioncash
268eeeb406
service: Add fgm services
Adds the basic skeleton for the fgm services based off the information
provided by Switch Brew.
8 years ago
Lioncash
e373027a73
service: Add the pcie service
Adds the basic skeleton of the pcie service based off information on
Switch Brew.
8 years ago
Tobias
420f8fb29e
Port #3758 from Citra ( #852 ): Add missing std::string import in text_formatter
8 years ago
Cameron Cawley
1670c4421f
Port #3732 from Citra: "common: Fix compilation on ARM"
8 years ago
B3n30
6e5f83ee24
remove polymorphism issue
8 years ago
zhupengfei
ff510157d8
common/string_utils: replace boost::transform with std counterpart
Note: according to cppreference it is necessary to convert char to unsigned char when using std::tolower and std::toupper, otherwise the behaviour would be undefined.
8 years ago
zhupengfei
38a1113674
Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code"
8 years ago
Lioncash
6ea416091e
service: Add wlan services
Adds the basic skeleton for the wlan services based off the information
on Switch Brew.
8 years ago
Lioncash
ca7655be3a
service: Add btm services
Adds the skeleton for the btm services based off the information on
Switch Brew.
8 years ago
Lioncash
7931cc0ceb
service: Add ncm services
Adds the basic skeleton for the ncm services based off information on
Switch Brew.
8 years ago
Lioncash
f46bfdd77d
service: Add mii services
Adds the skeleton for the mii services based off information provided by
Switch Brew
8 years ago
Lioncash
04d144aa40
service: Add nfc services
Adds the skeleton of the nfc service based off the information provided
on Switch Brew.
8 years ago
Lioncash
ea8dd8b650
service/lbl: Implement EnableVrMode, DisableVrMode and GetVrMode
Implements these functions according to the information available on
Switch Brew.
8 years ago
Lioncash
8781beaf0d
service: Add ldn services
Adds ldn services based off information provided by Switch Brew.
8 years ago
Zach Hilman
59cb258409
VFS Regression and Accuracy Fixes ( #776 )
* Regression and Mode Fixes
* Review Fixes
* string_view correction
* Add operator& for FileSys::Mode
* Return std::string from SanitizePath
* Farming Simulator Fix
* Use != With mode operator&
8 years ago
Lioncash
9d33122197
string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), CodeToUTF8() and UTF8ToUTF16()
There's no need to perform the resize separately here, since the
constructor allows presizing the buffer.
Also move the empty string check before the construction of the string
to make the early out more straightforward.
8 years ago
Lioncash
26a157cd31
string_util: Use emplace_back() in SplitString() instead of push_back()
This is equivalent to doing:
push_back(std::string(""));
which is likely not to cause issues, assuming a decent std::string
implementation with small-string optimizations implemented in its
design, however it's still a little unnecessary to copy that buffer
regardless. Instead, we can use emplace_back() to directly construct the
empty string within the std::vector instance, eliminating any possible
overhead from the copy.
8 years ago
Lioncash
cd46b267f5
string_util: Remove unnecessary std::string instance in TabsToSpaces()
We can just use the variant of std::string's replace() function that can
replace an occurrence with N copies of the same character, eliminating
the need to allocate a std::string containing a buffer of spaces.
8 years ago
Lioncash
398444e676
file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
8 years ago
Lioncash
c5de0a67a8
file_util: Remove goto usages from Copy()
We can just leverage std::unique_ptr to automatically close these for us
in error cases instead of jumping to the end of the function to call
fclose on them.
8 years ago
Lioncash
0ba7fe4ab1
file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
8 years ago
Lioncash
964154ce44
file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
8 years ago
Lioncash
d66b43dadf
file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.
We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
8 years ago
Lioncash
34d6a1349c
file_util: Remove explicit type from std::min() in GetPathWithoutTop()
Given both operands are the same type, there won't be an issue with
overload selection that requires making this explicit.
8 years ago