Skip to content

Commit

Permalink
fix anonymous(correct term?) struct usage
Browse files Browse the repository at this point in the history
MSVC didn't like the original declarations, removing the brackets fixed
it.
  • Loading branch information
cornytrace committed Aug 4, 2015
1 parent ef0ee49 commit 3b9bfb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/opendf/class/activator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void Activator::allocate(size_t idx, size_t flags, ActivatorCallback callback, s
{
mDeallocators[idx] = dealloc;
mFlags[idx] = flags;
mInactive[idx] = (ActivatorData){ callback, link };
mInactive[idx] = ActivatorData{ callback, link };
}

void Activator::deallocate(size_t idx)
Expand Down
5 changes: 3 additions & 2 deletions src/opendf/class/mover.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

#include "mover.hpp"

#include <algorithm>

#include "placeable.hpp"
#include "activator.hpp"
Expand All @@ -15,13 +16,13 @@ Mover Mover::sMovers;
void Mover::allocateTranslate(size_t idx, size_t soundid, const osg::Vec3f &orig, const osg::Vec3f &amount, float duration)
{
mSoundIds[idx] = soundid;
mTranslateStart[idx] = (MoverData){ idx, orig, amount, duration };
mTranslateStart[idx] = MoverData{ idx, orig, amount, duration };
}

void Mover::allocateRotate(size_t idx, size_t soundid, const osg::Vec3f &orig, const osg::Vec3f &amount, float duration)
{
mSoundIds[idx] = soundid;
mRotateStart[idx] = (MoverData){ idx, orig, amount, duration };
mRotateStart[idx] = MoverData{ idx, orig, amount, duration };
}


Expand Down

0 comments on commit 3b9bfb4

Please sign in to comment.