Browse Source

Adapted to Corrade changes.

Removing of another <*stream> #include leads to more compilation time
saving, now from ~5:12 to ~4:55. Another compilation time improvements
will now be possible only by using Clang's modules, I don't know where
to optimize further (except for getting rid of <sstream> in tests).
pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
47c0a7456c
  1. 18
      src/Math/RectangularMatrix.h
  2. 1
      src/Math/Test/Matrix3Test.cpp
  3. 1
      src/Math/Test/Matrix4Test.cpp
  4. 1
      src/Math/Test/MatrixTest.cpp
  5. 1
      src/Math/Test/Point2DTest.cpp
  6. 1
      src/Math/Test/Point3DTest.cpp
  7. 1
      src/Math/Test/RectangularMatrixTest.cpp
  8. 1
      src/Math/Test/Vector2Test.cpp
  9. 1
      src/Math/Test/Vector3Test.cpp
  10. 1
      src/Math/Test/Vector4Test.cpp
  11. 1
      src/Math/Test/VectorTest.cpp
  12. 2
      src/SceneGraph/Test/AnimableTest.cpp
  13. 1
      src/Test/ColorTest.cpp
  14. 1
      src/Test/MeshTest.cpp
  15. 1
      src/Test/TypeTraitsTest.cpp

18
src/Math/RectangularMatrix.h

@ -534,15 +534,19 @@ template<std::size_t cols, std::size_t rows, class T> struct ConfigurationValue<
/** @brief Reads elements separated with whitespace */
static Magnum::Math::RectangularMatrix<cols, rows, T> fromString(const std::string& stringValue, ConfigurationValueFlags flags) {
Magnum::Math::RectangularMatrix<cols, rows, T> result;
std::istringstream in(stringValue);
for(std::size_t row = 0; row != rows; ++row) {
for(std::size_t col = 0; col != cols; ++col) {
std::string num;
in >> num;
result(col, row) = ConfigurationValue<T>::fromString(num, flags);
std::size_t oldpos = 0, pos = std::string::npos, i = 0;
do {
pos = stringValue.find(' ', oldpos);
std::string part = stringValue.substr(oldpos, pos-oldpos);
if(!part.empty()) {
result(i%cols, i/cols) = ConfigurationValue<T>::fromString(part, flags);
++i;
}
}
oldpos = pos+1;
} while(pos != std::string::npos);
return result;
}

1
src/Math/Test/Matrix3Test.cpp

@ -15,6 +15,7 @@
#include "Matrix3Test.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Constants.h"

1
src/Math/Test/Matrix4Test.cpp

@ -15,6 +15,7 @@
#include "Matrix4Test.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Constants.h"

1
src/Math/Test/MatrixTest.cpp

@ -15,6 +15,7 @@
#include "MatrixTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Matrix.h"

1
src/Math/Test/Point2DTest.cpp

@ -15,6 +15,7 @@
#include "Point2DTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Point2D.h"

1
src/Math/Test/Point3DTest.cpp

@ -15,6 +15,7 @@
#include "Point3DTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Point3D.h"

1
src/Math/Test/RectangularMatrixTest.cpp

@ -15,6 +15,7 @@
#include "RectangularMatrixTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "RectangularMatrix.h"

1
src/Math/Test/Vector2Test.cpp

@ -15,6 +15,7 @@
#include "Vector2Test.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Vector2.h"

1
src/Math/Test/Vector3Test.cpp

@ -15,6 +15,7 @@
#include "Vector3Test.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Vector3.h"

1
src/Math/Test/Vector4Test.cpp

@ -15,6 +15,7 @@
#include "Vector4Test.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Vector4.h"

1
src/Math/Test/VectorTest.cpp

@ -15,6 +15,7 @@
#include "VectorTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Constants.h"

2
src/SceneGraph/Test/AnimableTest.cpp

@ -15,6 +15,8 @@
#include "AnimableTest.h"
#include <sstream>
#include "SceneGraph/Animable.h"
#include "SceneGraph/AnimableGroup.h"
#include "SceneGraph/MatrixTransformation3D.h"

1
src/Test/ColorTest.cpp

@ -15,6 +15,7 @@
#include "ColorTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Color.h"

1
src/Test/MeshTest.cpp

@ -15,6 +15,7 @@
#include "MeshTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "Mesh.h"

1
src/Test/TypeTraitsTest.cpp

@ -15,6 +15,7 @@
#include "TypeTraitsTest.h"
#include <sstream>
#include <Utility/Configuration.h>
#include "TypeTraits.h"

Loading…
Cancel
Save