Merge branch 'master' into fuzz-pipe

This commit is contained in:
Mike Morris
2014-07-15 17:06:35 -04:00
2 changed files with 14 additions and 1 deletions

View File

@@ -57,6 +57,10 @@ void Transform::moveBy(const double dx, const double dy, const timestamp duratio
void Transform::_moveBy(const double dx, const double dy, const timestamp duration) {
// This is only called internally, so we don't need a lock here.
platform::notify_map_change(duration ?
platform::MapChangeRegionWillChangeAnimated :
platform::MapChangeRegionWillChange);
final.x = current.x + std::cos(current.angle) * dx + std::sin(current.angle) * dy;
final.y = current.y + std::cos(current.angle) * dy + std::sin(-current.angle) * dx;
@@ -271,6 +275,10 @@ void Transform::_setScaleXY(const double new_scale, const double xn, const doubl
const timestamp duration) {
// This is only called internally, so we don't need a lock here.
platform::notify_map_change(duration ?
platform::MapChangeRegionWillChangeAnimated :
platform::MapChangeRegionWillChange);
final.scale = new_scale;
final.x = xn;
final.y = yn;
@@ -378,6 +386,10 @@ void Transform::setAngle(const double new_angle, const double cx, const double c
void Transform::_setAngle(double new_angle, const timestamp duration) {
// This is only called internally, so we don't need a lock here.
platform::notify_map_change(duration ?
platform::MapChangeRegionWillChangeAnimated :
platform::MapChangeRegionWillChange);
while (new_angle > M_PI)
new_angle -= M2PI;
while (new_angle <= -M_PI)

View File

@@ -2,6 +2,7 @@
#define LLMR_TEST_FIXTURE_LOG
#include <llmr/platform/log.hpp>
#include <llmr/util/noncopyable.hpp>
#include <boost/optional.hpp>
@@ -10,7 +11,7 @@
namespace llmr {
class FixtureLogBackend : public LogBackend {
class FixtureLogBackend : public LogBackend, private util::noncopyable {
public:
struct LogMessage {
inline LogMessage(EventSeverity severity, Event event, int64_t code, const std::string &msg)