Skip to content

Commit

Permalink
Merge pull request #3811 from Autodesk/donnels/EMSUSD-1351/no_pragma_…
Browse files Browse the repository at this point in the history
…once

EMSUSD-1351 - MayaUsd: Code cleanup - No pragma once
  • Loading branch information
seando-adsk authored Jun 7, 2024
2 parents 5f65756 + 12cd0df commit 4e2ac03
Show file tree
Hide file tree
Showing 104 changed files with 417 additions and 105 deletions.
5 changes: 4 additions & 1 deletion lib/mayaUsd/base/mayaUsd.h.src
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// limitations under the License.
//

#pragma once
#ifndef MAYAUSD_H
#define MAYAUSD_H

#define MAYAUSD_MAJOR_VERSION ${MAYAUSD_MAJOR_VERSION}
#define MAYAUSD_MINOR_VERSION ${MAYAUSD_MINOR_VERSION}
Expand Down Expand Up @@ -87,3 +88,5 @@ static_assert(!std::is_move_constructible<TypeName>::value, \
"Class should NOT be move constructible"); \
static_assert(!std::is_move_assignable<TypeName>::value, \
"Class should NOT be move assignable");

#endif // MAYAUSD_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/commands/PullPushCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PULLPUSHCOMMANDS_H
#define MAYAUSD_PULLPUSHCOMMANDS_H

#ifndef PXRUSDMAYA_PULLPUSHCOMMANDS_H
#define PXRUSDMAYA_PULLPUSHCOMMANDS_H
Expand Down Expand Up @@ -183,3 +184,5 @@ class DuplicateCommand : public PullPushBaseCommand
} // namespace MAYAUSD_NS_DEF

#endif /* PXRUSDMAYA_PULLPUSHCOMMANDS_H */

#endif // MAYAUSD_PULLPUSHCOMMANDS_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/fileio/importData.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// limitations under the License.
//

#pragma once
#ifndef MAYAUSD_IMPORTDATA_H
#define MAYAUSD_IMPORTDATA_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -140,3 +141,5 @@ class MAYAUSD_CORE_PUBLIC ImportData
};

} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_IMPORTDATA_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/fileio/orphanedNodesManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// limitations under the License.
//

#pragma once
#ifndef MAYAUSD_ORPHANEDNODESMANAGER_H
#define MAYAUSD_ORPHANEDNODESMANAGER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -201,3 +202,5 @@ class MAYAUSD_CORE_PUBLIC OrphanedNodesManager : public Ufe::Observer
};

} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_ORPHANEDNODESMANAGER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/fileio/translators/translatorMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
// Modifications copyright (C) 2020 Autodesk
//

#pragma once
#ifndef MAYAUSD_TRANSLATORMESH_H
#define MAYAUSD_TRANSLATORMESH_H

#include <mayaUsd/base/api.h>
#include <mayaUsd/fileio/primReaderRegistry.h>
Expand Down Expand Up @@ -95,3 +96,5 @@ class MAYAUSD_CORE_PUBLIC TranslatorMeshWrite
};

} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_TRANSLATORMESH_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/fileio/utils/orphanedNodesManagerUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// limitations under the License.
//

#pragma once
#ifndef MAYAUSD_ORPHANEDNODESMANAGERUTIL_H
#define MAYAUSD_ORPHANEDNODESMANAGERUTIL_H

#include <mayaUsd/fileio/orphanedNodesManager.h>

Expand Down Expand Up @@ -52,3 +53,5 @@ void printOrphanedNodesManagerPullInfo(

} // namespace utils
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_ORPHANEDNODESMANAGERUTIL_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/EditAsMayaCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_EDITASMAYACOMMAND_H
#define MAYAUSD_EDITASMAYACOMMAND_H

#include <mayaUsd/base/api.h>
#include <mayaUsd/undo/OpUndoItemList.h>
Expand Down Expand Up @@ -49,3 +50,5 @@ class MAYAUSD_CORE_PUBLIC EditAsMayaUfeCommand : public Ufe::UndoableCommand

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_EDITASMAYACOMMAND_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_UFE_GLOBAL_H
#define MAYAUSD_UFE_GLOBAL_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -44,3 +45,5 @@ Ufe::Rtid getMayaRunTimeId();

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_UFE_GLOBAL_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaStagesSubject.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYASTAGESSUBJECT_H
#define MAYAUSD_MAYASTAGESSUBJECT_H

#include <mayaUsd/base/api.h>
#include <mayaUsd/listeners/proxyShapeNotice.h>
Expand Down Expand Up @@ -97,3 +98,5 @@ class MAYAUSD_CORE_PUBLIC MayaStagesSubject : public UsdUfe::StagesSubject

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYASTAGESSUBJECT_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdContextOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDCONTEXTOPS_H
#define MAYAUSD_MAYAUSDCONTEXTOPS_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -55,3 +56,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdContextOps : public UsdUfe::UsdContextOps

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDCONTEXTOPS_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdContextOpsHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDCONTEXTOPSHANDLER_H
#define MAYAUSD_MAYAUSDCONTEXTOPSHANDLER_H

#include <mayaUsd/base/api.h>

Expand All @@ -39,3 +40,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdContextOpsHandler : public UsdUfe::UsdContextOp

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDCONTEXTOPSHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdHierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDHIERARCHY_H
#define MAYAUSD_MAYAUSDHIERARCHY_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -58,3 +59,5 @@ bool mayaUsdHierarchyChildrenHook(

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDHIERARCHY_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdHierarchyHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDHIERARCHYHANDLER_H
#define MAYAUSD_MAYAUSDHIERARCHYHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -43,3 +44,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdHierarchyHandler : public UsdUfe::UsdHierarchyH

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDHIERARCHYHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdObject3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDOBJECT3D_H
#define MAYAUSD_MAYAUSDOBJECT3D_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -46,3 +47,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdObject3d : public UsdUfe::UsdObject3d

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDOBJECT3D_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdObject3dHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#ifndef MAYAUSD_MAYAUSDOBJECT3DHANDLER_H
#define MAYAUSD_MAYAUSDOBJECT3DHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -42,3 +43,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdObject3dHandler : public UsdUfe::UsdObject3dHan

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDOBJECT3DHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/MayaUsdRootChildHierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_MAYAUSDROOTCHILDHIERARCHY_H
#define MAYAUSD_MAYAUSDROOTCHILDHIERARCHY_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -48,3 +49,5 @@ class MAYAUSD_CORE_PUBLIC MayaUsdRootChildHierarchy : public UsdUfe::UsdRootChil

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_MAYAUSDROOTCHILDHIERARCHY_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeCameraHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPECAMERAHANDLER_H
#define MAYAUSD_PROXYSHAPECAMERAHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -47,3 +48,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeCameraHandler : public Ufe::CameraHandler

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPECAMERAHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeContextOpsHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPECONTEXTOPSHANDLER_H
#define MAYAUSD_PROXYSHAPECONTEXTOPSHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -56,3 +57,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeContextOpsHandler : public Ufe::ContextOpsHa

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPECONTEXTOPSHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPEHANDLER_H
#define MAYAUSD_PROXYSHAPEHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -53,3 +54,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeHandler

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPEHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeHierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPEHIERARCHY_H
#define MAYAUSD_PROXYSHAPEHIERARCHY_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -96,3 +97,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeHierarchy : public Ufe::Hierarchy

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPEHIERARCHY_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeHierarchyHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPEHIERARCHYHANDLER_H
#define MAYAUSD_PROXYSHAPEHIERARCHYHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -62,3 +63,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeHierarchyHandler : public Ufe::HierarchyHand

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPEHIERARCHYHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/ProxyShapeSceneSegmentHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PROXYSHAPESCENESEGMENTHANDLER_H
#define MAYAUSD_PROXYSHAPESCENESEGMENTHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -56,3 +57,5 @@ class MAYAUSD_CORE_PUBLIC ProxyShapeSceneSegmentHandler : public Ufe::SceneSegme

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PROXYSHAPESCENESEGMENTHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/PulledObjectHierarchy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PULLEDOBJECTHIERARCHY_H
#define MAYAUSD_PULLEDOBJECTHIERARCHY_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -82,3 +83,5 @@ class MAYAUSD_CORE_PUBLIC PulledObjectHierarchy : public Ufe::Hierarchy

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PULLEDOBJECTHIERARCHY_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/PulledObjectHierarchyHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_PULLEDOBJECTHIERARCHYHANDLER_H
#define MAYAUSD_PULLEDOBJECTHIERARCHYHANDLER_H

#include <mayaUsd/base/api.h>

Expand Down Expand Up @@ -62,3 +63,5 @@ class MAYAUSD_CORE_PUBLIC PulledObjectHierarchyHandler : public Ufe::HierarchyHa

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_PULLEDOBJECTHIERARCHYHANDLER_H
5 changes: 4 additions & 1 deletion lib/mayaUsd/ufe/RotationUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma once
#ifndef MAYAUSD_ROTATIONUTILS_H
#define MAYAUSD_ROTATIONUTILS_H

#include <mayaUsd/mayaUsd.h>

Expand Down Expand Up @@ -120,3 +121,5 @@ inline Ufe::Vector3d fromZ(const PXR_NS::VtValue& value)

} // namespace ufe
} // namespace MAYAUSD_NS_DEF

#endif // MAYAUSD_ROTATIONUTILS_H
Loading

0 comments on commit 4e2ac03

Please sign in to comment.