Lioncash
6e9329455c
DSP/LabelMap: std::move std::string instances where applicable
...
We can std::move the std::string parameter in Label's constructor,
allowing the constructor to be moved into in calling code.
We can cascade this outwards in the interface as well.
2019-06-07 17:42:10 -04:00
Lioncash
32427af79e
DSP/LabelMap: Make label_t's definition hidden
...
Given this is a private struct and it's used in a container that
supports incomplete types, we can forward-declare it and move it into
the cpp file. While we're at it, we can change the name to Label to
follow our formatting guidelines.
2019-06-07 17:37:48 -04:00
Lioncash
a3ed4ceec5
DSP/LabelMap: Use std::optional with GetLabelValue()
...
Rather than use a bool and out parameter, we can collapse them into one
by using a std::optional.
2019-06-07 17:26:24 -04:00
Lioncash
747128b093
DSP/LabelMap: Collapse DeleteLabel loop into std::find_if
...
Same thing, no explicit loops.
2019-06-07 17:13:10 -04:00
Lioncash
98ec2ab2ac
DSP/LabelMap: Default constructor and destructor
...
We also move the destructor definition into the cpp file, as that will
allow us to make the entire label_t type hidden from external view in a
following change.
2019-06-07 17:07:06 -04:00
Lioncash
0a1249ea40
DSP/LabelMap: Amend class formatting
...
Places the most important stuff, the public interface first.
2019-06-07 17:05:25 -04:00
Léo Lam
e73a3ba1c6
Merge pull request #8160 from lioncash/dsp-tables
...
Core/DSP/DSPTables: Make FindOpInfoByName/FindExtOpInfoByName use std::string_view
2019-06-07 16:16:41 +02:00
Lioncash
60d10d2813
Core/DSP/DSPTables: Make FindOpInfoByName/FindExtOpInfoByName use std::string_view
...
These functions only ever compare against another string, so these can
have their parameters turned into std::string_view to make them more
flexible.
2019-06-06 12:22:02 -04:00
Léo Lam
3f4952d57c
Merge pull request #8152 from lioncash/array-size
...
Common/CommonFuncs: Remove now-unneccessary ArraySize function
2019-06-06 13:35:57 +02:00
Léo Lam
824ec84e82
Merge pull request #8154 from lioncash/analytics
...
{Common/Analytics, Core/Analytics}: Minor C++17 transitional changes
2019-06-06 13:25:17 +02:00
Léo Lam
90e3b88f14
Merge pull request #8159 from booto/swap_thing
...
SI_DeviceGCAdapter: Stop it being detected as a steering wheel when there is no device
2019-06-06 12:24:24 +02:00
booto
37919144c8
SI_DeviceGCAdapter: Stop it being detected as a steering wheel
2019-06-05 23:31:48 -04:00
Lioncash
e59f72739a
Core/Analytics: Turn analytics URL into a C-string
...
Less reading and also doesn't store an unnecessary pointer value in the
executable, making it smaller by 8 bytes.
2019-06-05 13:24:35 -04:00
Lioncash
ea9f887170
Core/Analytics: Use inline on static member variables
...
Starting with C++17, this allows for the same behavior as the existing
code, but without the need to manually write the out-of-class
definitions as well.
2019-06-05 13:24:35 -04:00
Lioncash
ebf3de4d93
Core/Analytics: Use std::lock_guard deduction guides
...
Starting with C++17, the type of the mutex being locked no longer needs
to be hardcoded into the type declaration.
2019-06-05 13:24:35 -04:00
Lioncash
57454e90a7
Core/Analytics: Make MakeUniqueId() a const member function
...
This function doesn't modify instance state, so we can mark it as const.
2019-06-05 13:24:34 -04:00
Lioncash
a5caa95a4b
Core/Analytics: Use std::string_view where applicable
...
In these cases, the strings are treated as views anyways, so we can use
them here to avoid potential allocations.
2019-06-05 13:24:34 -04:00
Lioncash
2c2b9690bb
Core/Analytics: Simplify static_assert
...
We can just use a std::array here to simplify the size calculation.
2019-06-05 13:24:34 -04:00
Lioncash
7935c27b52
Common/Analytics: Convert std::string overload into std::string_view
...
Allows for both string types to be non-allocating. We can't remove the
const char* overload in this case due to the fact that pointers can
implicitly convert to bool, so if we removed the overload all const
char arrays passed in would begin executing the bool overload instead of
the string_view overload, which is definitely not what we want to occur.
2019-06-05 13:24:31 -04:00
spycrab
78e566aaa5
Merge pull request #8156 from 8times9/resourcepack-header
...
Qt/ResourcePackManager: Remove column header bold text
2019-06-05 14:27:39 +02:00
8times9
ffb8f56a83
Qt/ResourcePackManager: Remove column header bold text
2019-06-04 19:13:39 -05:00
Lioncash
58e2cd5486
Common/Analytics: std::move std::string constructor parameter
...
Allows calling code to move into the constructor, avoiding the creation
of another string copy.
2019-06-03 20:13:00 -04:00
Lioncash
f813c4951a
Common/Analytics: Use deduction guides for std::lock_guard
...
Avoids needing to hardcode the type of mutex. We can also make use of
scoped_lock where two consecutive lock_guard instances are used.
2019-06-03 20:12:55 -04:00
Lioncash
6df65d7a5d
Common/Analytics: Default AnalyticsReportingBackend()'s destructor
...
Stays consistent with AnalyticsReportBuilder.
2019-06-03 18:27:45 -04:00
Tilka
4f6cdfe686
Merge pull request #8153 from Tilka/non_exec
...
Mark files as non-executable
2019-06-02 21:19:33 +01:00
Tillmann Karras
84e3391535
Mark files as non-executable
2019-06-02 12:31:40 +01:00
Lioncash
a9663669dc
Common/CommonFuncs: Remove now-unneccessary ArraySize function
...
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.
In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.
In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Léo Lam
a4837a5c5d
Merge pull request #8143 from lioncash/loader
...
VertexLoader_*: Minor cleanup
2019-05-31 14:18:16 +02:00
Léo Lam
eed4fcc218
Merge pull request #8135 from lioncash/cmake
...
CMakeLists: Specify header files in target sources
2019-05-31 14:03:12 +02:00
Léo Lam
2cb59ab055
Merge pull request #8148 from lioncash/view
...
AudioCommon: Use std::string_view with feature querying functions
2019-05-31 14:01:15 +02:00
Léo Lam
478f359d8d
Merge pull request #8149 from lioncash/sdio
...
IOS/SDIOSlot0: Remove unimplemented prototype
2019-05-31 13:58:54 +02:00
Lioncash
2060390a9f
IOS/SDIOSlot0: Tidy up parameter names of ExecuteCommand
...
Makes the names consistent between declaration and definition and
adjusts them to follow our code formatting guidelines.
Now all functions in the translation unit follow our formatting
guidelines.
2019-05-31 07:28:11 -04:00
Lioncash
61c25b3d23
IOS/SDIOSlot0: Remove unimplemented prototype
...
This function doesn't have an implementation, so we can remove it to
make for less reading (and a linker error waiting to happen).
2019-05-31 07:23:40 -04:00
Lioncash
78e96230b2
AudioCommon: Move static locals into the AudioCommon namespace
...
Given these are locals, they can be moved out of the global namespace.
While we're at it, turn the constants below it into constexpr variables.
2019-05-31 07:07:16 -04:00
Lioncash
15397e2a89
AudioCommon: Use emplace_back instead of push_back in GetSoundBackends()
...
Constructs the strings directly within the container instead of
performing a construction, then a copy.
The reasoning is that the BACKEND_* strings are const char arrays, so
the push_back code is equivalent to:
push_back(std::string(BACKEND_WHATEVER)) instead of forwarding the
arguments to a constructed instance directly in the container.
2019-05-31 07:03:54 -04:00
Lioncash
1a56e9d9e0
AudioCommon: Use std::string_view with feature querying functions
...
Provides the same behavior, but allows passed in strings to be
non-allocating in calling code.
2019-05-31 07:01:47 -04:00
Lioncash
3d27439d9a
VideoCommon/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
a41ba68c1e
VideoVulkan/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
cd9281772a
VideoSoftware/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
115e7992c5
VideoOGL/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
968d379cc4
VideoNull/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
87a57a5584
UpdaterCommon/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
4cdb493eab
UICommon/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Lioncash
24f5acf9a5
InputCommon/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Lioncash
b453229a68
DolphinQt/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Lioncash
0c538ef523
DolphinNoGUI/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Lioncash
cbcafd6830
DiscIO/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Lioncash
cd351fd478
Core/CMakeLists: Specify headers in target sources
2019-05-31 06:54:24 -04:00
Lioncash
b6d9b85293
AudioCommon/CMakeLists: Specify headers in target sources
2019-05-31 06:52:44 -04:00
Lioncash
48b82e82db
Common/CMakeLists: Specify headers alongside source files
...
Allows these files to show up as part of the project when generating IDE
builds from CMake.
2019-05-31 06:52:44 -04:00