Browse Source

Remove random unneeded <string> and StringStl.h includes.

Or document why is it still needed.
pull/499/head
Vladimír Vondruš 3 years ago
parent
commit
5d0454ce98
  1. 1
      doc/snippets/MagnumVk.cpp
  2. 2
      src/Magnum/GL/Test/ContextGLTest.cpp
  3. 3
      src/Magnum/Platform/WindowlessEglApplication.cpp
  4. 1
      src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp
  5. 1
      src/Magnum/Trade/AbstractImageConverter.cpp
  6. 2
      src/Magnum/Trade/Test/MaterialDataTest.cpp
  7. 2
      src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp
  8. 2
      src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp
  9. 2
      src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp
  10. 2
      src/Magnum/Trade/Test/PhongMaterialDataTest.cpp
  11. 1
      src/Magnum/Vk/Test/DevicePropertiesVkTest.cpp
  12. 21
      src/Magnum/Vk/Test/DeviceVkTest.cpp
  13. 5
      src/Magnum/Vk/Test/ExtensionPropertiesVkTest.cpp
  14. 4
      src/Magnum/Vk/Test/InstanceVkTest.cpp
  15. 5
      src/Magnum/Vk/Test/LayerPropertiesVkTest.cpp
  16. 1
      src/Magnum/Vk/VulkanTester.cpp

1
doc/snippets/MagnumVk.cpp

@ -23,7 +23,6 @@
DEALINGS IN THE SOFTWARE. DEALINGS IN THE SOFTWARE.
*/ */
#include <string>
#include <Corrade/Containers/Array.h> #include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>

2
src/Magnum/GL/Test/ContextGLTest.cpp

@ -27,7 +27,7 @@
#include <sstream> #include <sstream>
#include <Corrade/Containers/ScopeGuard.h> #include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/StringStl.h> /* contains() on std::string */
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>

3
src/Magnum/Platform/WindowlessEglApplication.cpp

@ -27,8 +27,7 @@
#include "WindowlessEglApplication.h" #include "WindowlessEglApplication.h"
#include <cstring> /** @todo used by extensionSupported(), cleann up */ #include <cstring> /** @todo used by extensionSupported(), clean up */
#include <string>
#include <Corrade/Utility/Arguments.h> #include <Corrade/Utility/Arguments.h>
#include <Corrade/Utility/Assert.h> #include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/Debug.h> #include <Corrade/Utility/Debug.h>

1
src/Magnum/TextureTools/Test/DistanceFieldGLTest.cpp

@ -24,7 +24,6 @@
*/ */
#include <Corrade/Containers/String.h> #include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove when AbstractImporter is <string>-free */
#include <Corrade/PluginManager/AbstractManager.h> #include <Corrade/PluginManager/AbstractManager.h>
#include <Corrade/Utility/Path.h> #include <Corrade/Utility/Path.h>

1
src/Magnum/Trade/AbstractImageConverter.cpp

@ -29,7 +29,6 @@
#include <Corrade/Containers/EnumSet.hpp> #include <Corrade/Containers/EnumSet.hpp>
#include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include <Corrade/Containers/StringStl.h> /** @todo remove once PluginManager is <string>-free */
#include <Corrade/PluginManager/Manager.hpp> #include <Corrade/PluginManager/Manager.hpp>
#include <Corrade/Utility/Assert.h> #include <Corrade/Utility/Assert.h>
#include <Corrade/Utility/Path.h> #include <Corrade/Utility/Path.h>

2
src/Magnum/Trade/Test/MaterialDataTest.cpp

@ -26,7 +26,7 @@
#include <algorithm> /* std::next_permutation() */ #include <algorithm> /* std::next_permutation() */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StaticArray.h> #include <Corrade/Containers/StaticArray.h>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/StringStl.h> /* partition() on a std::string */
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/TestSuite/Compare/Container.h> #include <Corrade/TestSuite/Compare/Container.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>

2
src/Magnum/Trade/Test/PbrClearCoatMaterialDataTest.cpp

@ -24,7 +24,7 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>

2
src/Magnum/Trade/Test/PbrMetallicRoughnessMaterialDataTest.cpp

@ -24,7 +24,7 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>

2
src/Magnum/Trade/Test/PbrSpecularGlossinessMaterialDataTest.cpp

@ -24,7 +24,7 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>

2
src/Magnum/Trade/Test/PhongMaterialDataTest.cpp

@ -24,7 +24,7 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>

1
src/Magnum/Vk/Test/DevicePropertiesVkTest.cpp

@ -26,7 +26,6 @@
#include <sstream> #include <sstream>
#include <Corrade/Containers/Array.h> #include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringStl.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>

21
src/Magnum/Vk/Test/DeviceVkTest.cpp

@ -27,8 +27,9 @@
#include <Corrade/Containers/Array.h> #include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Optional.h> #include <Corrade/Containers/Optional.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/StringStl.h> /* StringHasPrefix */
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>
#include <Corrade/TestSuite/Compare/String.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>
#include <Corrade/Utility/FormatStl.h> #include <Corrade/Utility/FormatStl.h>
@ -785,11 +786,14 @@ void DeviceVkTest::constructExtensionsCommandLineDisable() {
UnsignedInt major = versionMajor(deviceProperties.version()); UnsignedInt major = versionMajor(deviceProperties.version());
UnsignedInt minor = versionMinor(deviceProperties.version()); UnsignedInt minor = versionMinor(deviceProperties.version());
UnsignedInt patch = versionPatch(deviceProperties.version()); UnsignedInt patch = versionPatch(deviceProperties.version());
/* SwiftShader reports just 1.1 with no patch version, special-case that */
std::string expected = Utility::formatString(data.log, deviceProperties.name(), major, minor, patch ? Utility::formatString(".{}", patch) : "", deviceProperties.driverName(), deviceProperties.driverInfo());
/* The output might contain a device workaround list, cut that away. /* The output might contain a device workaround list, cut that away.
That's tested thoroughly in constructWorkaroundsCommandLineDisable(). */ That's tested thoroughly in constructWorkaroundsCommandLineDisable(). */
CORRADE_COMPARE(out.str().substr(0, expected.size()), expected); CORRADE_COMPARE_AS(out.str(),
Utility::format(data.log, deviceProperties.name(), major, minor,
/* SwiftShader reports just 1.1 with no patch version, special-case
that */
patch ? Utility::format(".{}", patch) : "", deviceProperties.driverName(), deviceProperties.driverInfo()),
TestSuite::Compare::StringHasPrefix);
/* Verify that the entrypoint is actually (not) loaded as expected, to /* Verify that the entrypoint is actually (not) loaded as expected, to
avoid all the above reporting being just smoke & mirrors */ avoid all the above reporting being just smoke & mirrors */
@ -842,11 +846,14 @@ void DeviceVkTest::constructExtensionsCommandLineEnable() {
UnsignedInt major = versionMajor(deviceProperties.version()); UnsignedInt major = versionMajor(deviceProperties.version());
UnsignedInt minor = versionMinor(deviceProperties.version()); UnsignedInt minor = versionMinor(deviceProperties.version());
UnsignedInt patch = versionPatch(deviceProperties.version()); UnsignedInt patch = versionPatch(deviceProperties.version());
/* SwiftShader reports just 1.1 with no patch version, special-case that */
std::string expected = Utility::formatString(data.log, deviceProperties.name(), major, minor, patch ? Utility::formatString(".{}", patch) : "", deviceProperties.driverName(), deviceProperties.driverInfo());
/* The output might contain a device workaround list, cut that away. /* The output might contain a device workaround list, cut that away.
That's tested thoroughly in constructWorkaroundsCommandLineDisable(). */ That's tested thoroughly in constructWorkaroundsCommandLineDisable(). */
CORRADE_COMPARE(out.str().substr(0, expected.size()), expected); CORRADE_COMPARE_AS(out.str(),
Utility::format(data.log, deviceProperties.name(), major, minor,
/* SwiftShader reports just 1.1 with no patch version, special-case
that */
patch ? Utility::format(".{}", patch) : "", deviceProperties.driverName(), deviceProperties.driverInfo()),
TestSuite::Compare::StringHasPrefix);
/* Verify that the entrypoint is actually (not) loaded as expected, to /* Verify that the entrypoint is actually (not) loaded as expected, to
avoid all the above reporting being just smoke & mirrors */ avoid all the above reporting being just smoke & mirrors */

5
src/Magnum/Vk/Test/ExtensionPropertiesVkTest.cpp

@ -24,8 +24,8 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/String.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Containers/StringStl.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>
@ -169,8 +169,7 @@ void ExtensionPropertiesVkTest::instanceExtensionIsSupported() {
CORRADE_VERIFY(!properties.isSupported("ZZZZZ")); CORRADE_VERIFY(!properties.isSupported("ZZZZZ"));
/* Verify that we're not just comparing a prefix */ /* Verify that we're not just comparing a prefix */
const std::string extension = std::string(properties.name(0)) + "_hello"; CORRADE_VERIFY(!properties.isSupported(properties.name(0) + "_hello"_s));
CORRADE_VERIFY(!properties.isSupported(extension));
/* This extension should be available almost always */ /* This extension should be available almost always */
if(!properties.isSupported("VK_KHR_get_physical_device_properties2")) if(!properties.isSupported("VK_KHR_get_physical_device_properties2"))

4
src/Magnum/Vk/Test/InstanceVkTest.cpp

@ -26,7 +26,7 @@
#include <sstream> #include <sstream>
#include <Corrade/Containers/Array.h> #include <Corrade/Containers/Array.h>
#include <Corrade/Containers/StringIterable.h> #include <Corrade/Containers/StringIterable.h>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>
@ -432,7 +432,7 @@ void InstanceVkTest::constructCommandLineEnable() {
UnsignedInt minor = versionMinor(enumerateInstanceVersion()); UnsignedInt minor = versionMinor(enumerateInstanceVersion());
UnsignedInt patch = versionPatch(enumerateInstanceVersion()); UnsignedInt patch = versionPatch(enumerateInstanceVersion());
/* Vulkan 1.0 instances report no patch version, special-case that */ /* Vulkan 1.0 instances report no patch version, special-case that */
CORRADE_COMPARE(out.str(), Utility::formatString(data.log, major, minor, patch ? Utility::formatString(".{}", patch) : "")); CORRADE_COMPARE(out.str(), Utility::formatString(data.log, major, minor, patch ? Utility::format(".{}", patch) : ""));
/* Verify that the entrypoint is actually (not) loaded as expected, to /* Verify that the entrypoint is actually (not) loaded as expected, to
avoid all the above reporting being just smoke & mirrors */ avoid all the above reporting being just smoke & mirrors */

5
src/Magnum/Vk/Test/LayerPropertiesVkTest.cpp

@ -24,7 +24,7 @@
*/ */
#include <sstream> #include <sstream>
#include <Corrade/Containers/StringStl.h> #include <Corrade/Containers/String.h>
#include <Corrade/TestSuite/Tester.h> #include <Corrade/TestSuite/Tester.h>
#include <Corrade/TestSuite/Compare/Numeric.h> #include <Corrade/TestSuite/Compare/Numeric.h>
#include <Corrade/Utility/DebugStl.h> #include <Corrade/Utility/DebugStl.h>
@ -136,8 +136,7 @@ void LayerPropertiesVkTest::isSupported() {
} }
/* Verify that we're not just comparing a prefix */ /* Verify that we're not just comparing a prefix */
const std::string layer = std::string(properties.name(0)) + "_hello"; CORRADE_VERIFY(!properties.isSupported(properties.name(0) + "_hello"_s));
CORRADE_VERIFY(!properties.isSupported(layer));
} }
}}}} }}}}

1
src/Magnum/Vk/VulkanTester.cpp

@ -25,7 +25,6 @@
#include "VulkanTester.h" #include "VulkanTester.h"
#include <string> /* sigh, for setSkippedArgumentPrefixes() */
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include "Magnum/Vk/DeviceCreateInfo.h" #include "Magnum/Vk/DeviceCreateInfo.h"

Loading…
Cancel
Save