Hi,

Now the second one is correct, because you should use angle
brackets <...> for system headers, and quote marks "..." for
non system headers. I think you should use "wtf/HashSet.h".

It is important, because searches order is different with <...> and "...":
http://gcc.gnu.org/onlinedocs/gcc-4.3.2//cpp/Include-Syntax.html#Include-Syntax

#include <file>:
1.) -I ... directories
2.) -isystem .. directories
3.) standard system directories

#include "file":
1.) in the directory containing the current file
2.) -iquote
2.) -I
3.) -isystem
4.) standard system directories

br,
Ossy

Patrick Roland Gansterer írta:
Currently, the style guidelines specify "Includes of system headers must
come after includes of other headers. "
But what about WebKit headers in arrow brackets?

What is the correct style:

#include "ArgumentEncoder.h"
#include "WorkItem.h"
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h> #include <QApplication>
#include <QLocalServer>

or
#include "ArgumentEncoder.h"
#include "WorkItem.h"
#include <QApplication>
#include <QLocalServer>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
I prefere the first one because <wtf/*.h> aren't real system headers.

- Patrick
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to