Skip to content

Commit

Permalink
Use quote style for local includes
Browse files Browse the repository at this point in the history
Summary:
This PR changes `#include <CSSLayout/*.h>` to  `#include "*.h"` within the `CSSLayout` directory.

Rationale: Quote includes are preferred for user (aka local/project) includes, whereas angle includes are preferred for standard libraries and external frameworks. In particular, XCode 7.1+ will not search user paths (even the current directory) when angle brackets are used unless "Always search user paths" is enabled - it is off by default and [Apple recommend](https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW110) that it is only enabled for backwards compatibility.

I think this is the best fix for facebook#9014, and seems like good practice in any case.
Closes facebook/yoga#217

Reviewed By: majak

Differential Revision: D3764132

Pulled By: emilsjolander

fbshipit-source-id: c8a6e8d19db71455922e3ba8f6c72bd66018fa84
  • Loading branch information
robhogan authored and Spike Brehm committed Sep 21, 2016
1 parent c18d1df commit 6fcb546
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions React/CSSLayout/CSSLayout-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#pragma once

#include <CSSLayout/CSSLayout.h>
#include <CSSLayout/CSSNodeList.h>
#include "CSSLayout.h"
#include "CSSNodeList.h"

CSS_EXTERN_C_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion React/CSSLayout/CSSLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};

#define CSSUndefined NAN

#include <CSSLayout/CSSMacros.h>
#include "CSSMacros.h"

CSS_EXTERN_C_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions React/CSSLayout/CSSNodeList.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <stdio.h>
#include <stdlib.h>

#include <CSSLayout/CSSLayout.h>
#include <CSSLayout/CSSMacros.h>
#include "CSSLayout.h"
#include "CSSMacros.h"

CSS_EXTERN_C_BEGIN

Expand Down

0 comments on commit 6fcb546

Please sign in to comment.