Commit Graph

30833 Commits

Author SHA1 Message Date
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
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
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
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
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
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
6df65d7a5d Common/Analytics: Default AnalyticsReportingBackend()'s destructor
Stays consistent with AnalyticsReportBuilder.
2019-06-03 18:27:45 -04:00
4f6cdfe686 Merge pull request #8153 from Tilka/non_exec
Mark files as non-executable
2019-06-02 21:19:33 +01:00
84e3391535 Mark files as non-executable 2019-06-02 12:31:40 +01:00
a4837a5c5d Merge pull request #8143 from lioncash/loader
VertexLoader_*: Minor cleanup
2019-05-31 14:18:16 +02:00
eed4fcc218 Merge pull request #8135 from lioncash/cmake
CMakeLists: Specify header files in target sources
2019-05-31 14:03:12 +02:00
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
478f359d8d Merge pull request #8149 from lioncash/sdio
IOS/SDIOSlot0: Remove unimplemented prototype
2019-05-31 13:58:54 +02:00
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
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
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
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
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
3d27439d9a VideoCommon/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
a41ba68c1e VideoVulkan/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
cd9281772a VideoSoftware/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
115e7992c5 VideoOGL/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
968d379cc4 VideoNull/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
87a57a5584 UpdaterCommon/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00
4cdb493eab UICommon/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
24f5acf9a5 InputCommon/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
b453229a68 DolphinQt/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
0c538ef523 DolphinNoGUI/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
cbcafd6830 DiscIO/CMakeLists: Specify headers in target sources 2019-05-31 06:54:25 -04:00
cd351fd478 Core/CMakeLists: Specify headers in target sources 2019-05-31 06:54:24 -04:00
b6d9b85293 AudioCommon/CMakeLists: Specify headers in target sources 2019-05-31 06:52:44 -04:00
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
5ffbec6956 Merge pull request #8144 from lioncash/tie
Common/x64Emitter: Resolve TODO in OpArg's operator==
2019-05-31 11:05:33 +02:00
43eef41204 Merge pull request #8147 from booto/cp_registers
VideoCommon: Constrain the array_base registers
2019-05-31 17:38:56 +10:00
bc8a4f99c7 VideoCommon: Constrain the array_base registers
The array_base registers as part of CP state do not seem to incorporate
the upper bits in the physical address they try to access.
2019-05-31 03:22:00 -04:00
8046f40784 Merge pull request #8145 from Techjar/shaderuid-memcmp-fix
VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators
2019-05-30 18:00:43 -04:00
cd3ba570df VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators 2019-05-30 16:00:46 -04:00
2452747429 VertexLoader_TextCoord: Tidy up public function definitions
We can use u32 instead of unsigned int to shorten up these definitions
and make them much nicer to read.

While we're at it, change the size array to house u32 elements
to match the return value of the function.
2019-05-30 10:29:51 -04:00
9569c79ca2 VertexLoader_TextCoord: Make lookup tables immutable
Allows the compiler to place the data within the read-only segment.
2019-05-30 10:29:50 -04:00
16a03bade2 VertexLoader_TextCoord: Place helper functions in anonymous namespace
Gives them all internal linkage.
2019-05-30 10:29:50 -04:00
6f656b7219 VertexLoader_Position: Tidy up public function definitions
We can use u32 instead of unsigned int to shorten up these definitions
and make them much nicer to read.

While we're at it, change the size array to house u32 elements to match
the return value of the function.
2019-05-30 10:29:50 -04:00
14e544eef8 VertexLoader_Position: Make lookup tables immutable
Allows the compiler to place these arrays within the read-only segment.
2019-05-30 10:29:50 -04:00
be9a03b35f VertexLoader_Position: Place helper functions in anonymous namespace 2019-05-30 10:29:50 -04:00
60a1d0593c VertexLoader_Color: Place helper functions in anonymous namespace
While we're at it, convert the define into a constexpr variable.
2019-05-30 10:29:47 -04:00
66596c5176 Common/x64Emitter: Resolve TODO in OpArg's operator==
We now require C++17, so we can use std::tie here.
2019-05-30 10:27:28 -04:00
00ecfb3c59 Merge pull request #8138 from lioncash/input-string
ControllerInterface/Device: Minor cleanup
2019-05-30 14:33:53 +02:00
4e7a790648 Merge pull request #8140 from lioncash/vertex
VideoCommon/VertexLoader_Normal: Construct look-up table at compile-time
2019-05-30 14:28:59 +02:00
90c9991086 Merge pull request #8141 from lioncash/init
VideoCommon/ShaderGenCommon: Simplify initialization of ShaderUid class
2019-05-30 14:15:02 +02:00
2ce587f781 Merge pull request #8142 from lioncash/shader-view
VideoCommon/RenderBase: Use std::string_view with CreateShaderFromSource()
2019-05-30 14:12:18 +02:00
8d8ed37e27 Merge pull request #7291 from VinDuv/gc-adapter-error-report
GC USB Adapter configuration improvements
2019-05-30 13:54:01 +02:00