Skip to content

Commit

Permalink
Private project's header files should be #include'd using the file na…
Browse files Browse the repository at this point in the history
…me when in the same folder. Private headers may live in sub-directories, but they should never be included using "." or ".." as part of a relative paths. For example:

#include "privateUtils.h"
#include "pvt/helperFunctions.h"
  • Loading branch information
Hamed Sabri committed Mar 28, 2020
1 parent c05eb7f commit fb592d1
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 28 deletions.
3 changes: 2 additions & 1 deletion lib/mayaUsd/ufe/Global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#include <mayaUsd/ufe/Global.h>

#include <mayaUsd/ufe/private/InPathChange.h>
#include "private/InPathChange.h"

#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/ProxyShapeHierarchyHandler.h>
#include <mayaUsd/ufe/StagesSubject.h>
Expand Down
3 changes: 2 additions & 1 deletion lib/mayaUsd/ufe/StagesSubject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#include <mayaUsd/ufe/StagesSubject.h>

#include <mayaUsd/ufe/private/InPathChange.h>
#include "private/InPathChange.h"

#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/UsdStageMap.h>
#include <mayaUsd/ufe/Utils.h>
Expand Down
5 changes: 3 additions & 2 deletions lib/mayaUsd/ufe/UsdHierarchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
#include <cassert>
#include <stdexcept>

#include <mayaUsd/ufe/private/InPathChange.h>
#include <mayaUsd/ufe/private/Utils.h>
#include "private/InPathChange.h"
#include "private/Utils.h"

#include <mayaUsd/ufe/UsdUndoCreateGroupCommand.h>
#include <mayaUsd/ufe/Utils.h>

Expand Down
2 changes: 1 addition & 1 deletion lib/mayaUsd/ufe/UsdRotatePivotTranslateUndoableCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
#include <mayaUsd/ufe/UsdRotatePivotTranslateUndoableCommand.h>

#include <mayaUsd/ufe/private/Utils.h>
#include "private/Utils.h"

MAYAUSD_NS_DEF {
namespace ufe {
Expand Down
2 changes: 1 addition & 1 deletion lib/mayaUsd/ufe/UsdRotateUndoableCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <mayaUsd/ufe/UsdRotateUndoableCommand.h>

#include <mayaUsd/ufe/private/Utils.h>
#include "private/Utils.h"

MAYAUSD_NS_DEF {
namespace ufe {
Expand Down
3 changes: 2 additions & 1 deletion lib/mayaUsd/ufe/UsdScaleUndoableCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#include <mayaUsd/ufe/UsdScaleUndoableCommand.h>

#include <mayaUsd/ufe/private/Utils.h>
#include "private/Utils.h"

#include <mayaUsd/ufe/Utils.h>

MAYAUSD_NS_DEF {
Expand Down
4 changes: 3 additions & 1 deletion lib/mayaUsd/ufe/UsdTransform3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
//

#include <mayaUsd/ufe/UsdTransform3d.h>
#include <mayaUsd/ufe/private/Utils.h>

#include "private/Utils.h"

#include <mayaUsd/ufe/UsdRotatePivotTranslateUndoableCommand.h>
#include <mayaUsd/ufe/UsdRotateUndoableCommand.h>
#include <mayaUsd/ufe/UsdScaleUndoableCommand.h>
Expand Down
3 changes: 2 additions & 1 deletion lib/mayaUsd/ufe/UsdTranslateUndoableCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#include <mayaUsd/ufe/UsdTranslateUndoableCommand.h>

#include <mayaUsd/ufe/private/Utils.h>
#include "private/Utils.h"

#include <mayaUsd/ufe/Utils.h>

MAYAUSD_NS_DEF {
Expand Down
3 changes: 2 additions & 1 deletion lib/mayaUsd/ufe/UsdUndoRenameCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

#include <mayaUsd/ufe/UsdUndoRenameCommand.h>

#include <mayaUsd/ufe/private/InPathChange.h>
#include "private/InPathChange.h"

#include <mayaUsd/ufe/Utils.h>

#include <ufe/scene.h>
Expand Down
4 changes: 3 additions & 1 deletion lib/mayaUsd/ufe/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
//

#include <mayaUsd/ufe/Utils.h>

#include "private/Utils.h"

#include <mayaUsd/nodes/proxyShapeBase.h>
#include <mayaUsd/ufe/private/Utils.h>
#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/UsdStageMap.h>

Expand Down
16 changes: 0 additions & 16 deletions lib/mayaUsd/ufe/private/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,3 @@ target_sources(${PROJECT_NAME}
Utils.cpp
)

set(headers
Utils.h
InPathChange.h
)

# -----------------------------------------------------------------------------
# promoted headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR ufe/private)

# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
install(FILES ${headers}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/ufe/private
)
2 changes: 1 addition & 1 deletion lib/mayaUsd/ufe/private/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// limitations under the License.
//

#include <mayaUsd/ufe/private/Utils.h>
#include "Utils.h"

#include <string>
#include <memory>
Expand Down

0 comments on commit fb592d1

Please sign in to comment.