Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MacOSX build in strict mode: #275

Merged
merged 2 commits into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,9 @@ class ProxyShape
<< m_selected << ":"
<< int(m_refCount) << std::endl;
}
uint32_t selected() const { return m_selected; }
uint32_t required() const { return m_required; }
uint32_t refCount() const { return m_refCount; }
uint16_t selected() const { return m_selected; }
uint16_t required() const { return m_required; }
uint16_t refCount() const { return m_refCount; }
void prepSelect()
{ m_selectedTemp = m_selected; }
private:
Expand All @@ -963,10 +963,10 @@ class ProxyShape
// ref counting values
struct
{
uint64_t m_required:16;
uint64_t m_selectedTemp:16;
uint64_t m_selected:16;
uint64_t m_refCount:16;
uint16_t m_required;
uint16_t m_selectedTemp;
uint16_t m_selected;
uint16_t m_refCount;
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void ProxyShape::printRefCounts() const
//----------------------------------------------------------------------------------------------------------------------
inline bool ProxyShape::TransformReference::decRef(const TransformReason reason)
{
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::decRef %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::decRef %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selected, m_refCount, m_required);
switch(reason)
{
case kSelection: assert(m_selected); --m_selected; break;
Expand All @@ -263,14 +263,14 @@ inline bool ProxyShape::TransformReference::decRef(const TransformReason reason)
break;
}

TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::decRefEnd %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::decRefEnd %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selected, m_refCount, m_required);
return !m_required && !m_selected && !m_refCount;
}

//----------------------------------------------------------------------------------------------------------------------
inline void ProxyShape::TransformReference::incRef(const TransformReason reason)
{
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::incRef %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::incRef %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selected, m_refCount, m_required);
switch(reason)
{
case kSelection: ++m_selected; break;
Expand All @@ -279,13 +279,13 @@ inline void ProxyShape::TransformReference::incRef(const TransformReason reason)
default: assert(0); break;
}

TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::incRefEnd %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::incRefEnd %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selected, m_refCount, m_required);
}

//----------------------------------------------------------------------------------------------------------------------
inline void ProxyShape::TransformReference::checkIncRef(const TransformReason reason)
{
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::checkIncRef %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::checkIncRef %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selected, m_refCount, m_required);
switch(reason)
{
case kSelection: ++m_selectedTemp; break;
Expand All @@ -296,7 +296,7 @@ inline void ProxyShape::TransformReference::checkIncRef(const TransformReason re
//----------------------------------------------------------------------------------------------------------------------
inline bool ProxyShape::TransformReference::checkRef(const TransformReason reason)
{
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::checkRef %" PRIu64 " : %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", m_selectedTemp, m_selected, m_refCount, m_required);
TF_DEBUG(ALUSDMAYA_SELECTION).Msg("ProxyShapeSelection::TransformReference::checkRef %" PRIu16 " : %" PRIu16 " %" PRIu16 " %" PRIu16 "\n", m_selectedTemp, m_selected, m_refCount, m_required);
uint32_t sl = m_selected;
uint32_t rc = m_refCount;
uint32_t rq = m_required;
Expand Down