浏览代码

LibJS: Let Utf16String be forward-declared in Value.h

It's only used as a template parameter, so let it be forward-declared.
Otherwise, we aren't able to include Completion.h in Utf16String.h, as
there would be a Utf16String -> Completion -> Value -> Utf16String
include cycle.
Timothy Flynn 2 年之前
父节点
当前提交
49b24b0968
共有 2 个文件被更改,包括 1 次插入1 次删除
  1. 1 0
      Userland/Libraries/LibJS/Runtime/Value.cpp
  2. 0 1
      Userland/Libraries/LibJS/Runtime/Value.h

+ 1 - 0
Userland/Libraries/LibJS/Runtime/Value.cpp

@@ -36,6 +36,7 @@
 #include <LibJS/Runtime/StringObject.h>
 #include <LibJS/Runtime/StringPrototype.h>
 #include <LibJS/Runtime/SymbolObject.h>
+#include <LibJS/Runtime/Utf16String.h>
 #include <LibJS/Runtime/VM.h>
 #include <LibJS/Runtime/Value.h>
 #include <math.h>

+ 0 - 1
Userland/Libraries/LibJS/Runtime/Value.h

@@ -19,7 +19,6 @@
 #include <LibJS/Forward.h>
 #include <LibJS/Heap/GCPtr.h>
 #include <LibJS/Runtime/BigInt.h>
-#include <LibJS/Runtime/Utf16String.h>
 #include <math.h>
 
 // 2 ** 53 - 1