summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2018-08-01Merge pull request #888 from lioncash/capsbunnei
service: Add capture services
2018-08-01service: Add capture servicesLioncash
Adds the basic skeleton for the capture services based off information provided by Switch Brew.
2018-08-01service: Add bpc and pcv servicesLioncash
Adds the basic skeleton for the remaining pcv-related services based off information on Switch Brew.
2018-07-31Merge pull request #864 from FearlessTobi/port-3973bunnei
Port #3973 from Citra: "Remove polymorphism issue"
2018-07-31Merge pull request #875 from lioncash/fgmbunnei
service: Add fgm services
2018-07-31service: Add fgm servicesLioncash
Adds the basic skeleton for the fgm services based off the information provided by Switch Brew.
2018-07-31service: Add the pcie serviceLioncash
Adds the basic skeleton of the pcie service based off information on Switch Brew.
2018-07-30Port #3758 from Citra (#852): Add missing std::string import in text_formatterTobias
2018-07-30Merge pull request #861 from FearlessTobi/port-3972bunnei
Port #3972 from Citra: "common/timer: use std::chrono, avoid platform-dependent code"
2018-07-30Merge pull request #862 from FearlessTobi/port-3997bunnei
Port #3997 from Citra: "common/string_utils: replace boost::transform with std counterpart"
2018-07-30Merge pull request #865 from FearlessTobi/port-3732bunnei
Port #3732 from Citra: "common: Fix compilation on ARM"
2018-07-30Merge pull request #857 from lioncash/wlanbunnei
service: Add wlan services
2018-07-29Port #3732 from Citra: "common: Fix compilation on ARM"Cameron Cawley
2018-07-29remove polymorphism issueB3n30
2018-07-29common/string_utils: replace boost::transform with std counterpartzhupengfei
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.
2018-07-29Port #3972 from Citra: "common/timer: use std::chrono, avoid ↵zhupengfei
platform-dependent code"
2018-07-28service: Add wlan servicesLioncash
Adds the basic skeleton for the wlan services based off the information on Switch Brew.
2018-07-28service: Add btm servicesLioncash
Adds the skeleton for the btm services based off the information on Switch Brew.
2018-07-28Merge pull request #847 from lioncash/ncmbunnei
service: Add ncm services
2018-07-28Merge pull request #846 from lioncash/miibunnei
service: Add mii services
2018-07-27service: Add ncm servicesLioncash
Adds the basic skeleton for the ncm services based off information on Switch Brew.
2018-07-27Merge pull request #845 from lioncash/nfcbunnei
service: Add nfc services
2018-07-27service: Add mii servicesLioncash
Adds the skeleton for the mii services based off information provided by Switch Brew
2018-07-27service: Add nfc servicesLioncash
Adds the skeleton of the nfc service based off the information provided on Switch Brew.
2018-07-27service/lbl: Implement EnableVrMode, DisableVrMode and GetVrModeLioncash
Implements these functions according to the information available on Switch Brew.
2018-07-26service: Add ldn servicesLioncash
Adds ldn services based off information provided by Switch Brew.
2018-07-23VFS Regression and Accuracy Fixes (#776)Zach Hilman
* 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&
2018-07-22string_util: Get rid of separate resize() in CPToUTF16(), UTF16ToUTF8(), ↵Lioncash
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.
2018-07-22string_util: Use emplace_back() in SplitString() instead of push_back()Lioncash
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.
2018-07-22string_util: Remove unnecessary std::string instance in TabsToSpaces()Lioncash
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.
2018-07-22Merge pull request #768 from lioncash/string-viewbunnei
file_util, vfs: Use std::string_view where applicable
2018-07-22file_util, vfs: Use std::string_view where applicableLioncash
Avoids unnecessary construction of std::string instances where applicable.
2018-07-22Merge pull request #765 from lioncash/filebunnei
file_util: Remove goto usages from Copy()
2018-07-21file_util: Remove goto usages from Copy()Lioncash
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.
2018-07-21file_util: Use a u64 to represent number of entriesLioncash
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.
2018-07-21file_util: std::move FST entries in ScanDirectoryTree()Lioncash
Avoids unnecessary copies when building up the FST entries.
2018-07-21Merge pull request #759 from lioncash/redundantbunnei
file_util: Remove redundant duplicate return in GetPathWithoutTop()
2018-07-21Merge pull request #758 from lioncash/syncbunnei
common: Remove synchronized_wrapper.h
2018-07-21file_util: Use an enum class for GetUserPath()Lioncash
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.
2018-07-21file_util: Remove explicit type from std::min() in GetPathWithoutTop()Lioncash
Given both operands are the same type, there won't be an issue with overload selection that requires making this explicit.
2018-07-21file_util: Remove redundant duplicate return in GetPathWithoutTop()Lioncash
2018-07-21common: Remove synchronized_wrapper.hLioncash
This is entirely unused in the codebase.
2018-07-20Merge pull request #743 from lioncash/viewbunnei
logging: Use std::string_view where applicable
2018-07-20param_package: Take std::string by value in string-based Set() functionLioncash
Allows avoiding string copies by letting the strings be moved into the function calls.
2018-07-20param_package: Use std::unordered_map's insert_or_assign instead of map indexingLioncash
This avoids a redundant std::string construction if a key doesn't exist in the map already. e.g. data[key] requires constructing a new default instance of the value in the map (but this is wasteful, since we're already setting something into the map over top of it).
2018-07-20param_package: Get rid of file-static std::string constructionLioncash
Avoids potential dynamic allocation occuring during program launch
2018-07-20logging/filter: Use std::string_view in ParseFilterString()Lioncash
Allows avoiding constructing std::string instances, since this only reads an arbitrary sequence of characters. We can also make ParseFilterRule() internal, since it doesn't depend on any private instance state of Filter
2018-07-20logging/backend: Add missing standard includesLioncash
A few inclusions were being satisfied indirectly. To prevent breakages in the future, include these directly.
2018-07-20logging/backend: Use std::string_view in RemoveBackend() and GetBackend()Lioncash
These can just use a view to a string since its only comparing against two names in both cases for matches. This avoids constructing std::string instances where they aren't necessary.
2018-07-19Merge pull request #711 from lioncash/swapbunnei
common/swap: Minor changes