Skip to content

Commit

Permalink
Remove unused using (dune warnings)
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Nov 26, 2024
1 parent 1709bda commit 1f553c5
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 58 deletions.
1 change: 0 additions & 1 deletion src/context/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*)
open Extlib_leftovers
open Ast
open Type
open Globals
Expand Down
1 change: 0 additions & 1 deletion src/context/sourcemaps.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open Extlib_leftovers
open Globals
open Gctx

(**
Characters used for base64 VLQ encoding
Expand Down
5 changes: 1 addition & 4 deletions src/generators/cpp/cppAst.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
open Extlib_leftovers
open Ast
open Type
open Error
open Globals

type tcpp =
Expand Down Expand Up @@ -154,4 +151,4 @@ and tcpp_expr_expr =
| CppCastObjC of tcppexpr * tclass
| CppCastObjCBlock of tcppexpr * tcpp list * tcpp
| CppCastProtocol of tcppexpr * tclass
| CppCastNative of tcppexpr
| CppCastNative of tcppexpr
4 changes: 1 addition & 3 deletions src/generators/cpp/cppAstTools.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
open Extlib_leftovers
open Ast
open Type
open Error
open Globals
open CppAst
open CppTypeUtils
Expand Down Expand Up @@ -726,4 +724,4 @@ let enum_getter_type t =
| TCppScalar "int" -> "Int"
| TCppScalar "bool" -> "Bool"
| TCppScalar x -> x
| _ -> "Object"
| _ -> "Object"
7 changes: 1 addition & 6 deletions src/generators/cpp/cppContext.ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
open Extlib_leftovers
open Ast
open Gctx
open Type
open Error
open Globals
open CppAstTools

(* CPP code generation context *)
Expand Down Expand Up @@ -98,4 +93,4 @@ let is_gc_element ctx member_type =

let strip_file ctx file = match Gctx.defined ctx Define.AbsolutePath with
| true -> Path.get_full_path file
| false -> ctx.class_paths#relative_path file
| false -> ctx.class_paths#relative_path file
6 changes: 1 addition & 5 deletions src/generators/cpp/cppExprUtils.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
open Extlib_leftovers
open Ast
open Type
open Error
open Globals

let rec remove_parens expression =
match expression.eexpr with
Expand All @@ -20,4 +16,4 @@ let rec remove_parens_cast expression =
let is_static_access obj =
match (remove_parens obj).eexpr with
| TTypeExpr _ -> true
| _ -> false
| _ -> false
2 changes: 0 additions & 2 deletions src/generators/cpp/cppRetyper.ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
open Extlib_leftovers
open Ast
open Type
open Error
open Globals
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
Expand Down
7 changes: 1 addition & 6 deletions src/generators/cpp/cppSourceWriter.ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
open Extlib_leftovers
open Ast
open Gctx
open Type
open Error
open Globals
open CppStrings
open CppAstTools
open CppTypeUtils
Expand Down Expand Up @@ -185,4 +180,4 @@ let new_placed_cpp_file common_ctx class_path =
( base_dir ^ "/src/" ^ ( String.concat "-" (fst class_path) ) ^ "-" ^
(snd class_path) ^ (source_file_extension common_ctx) )
end else
new_cpp_file common_ctx common_ctx.file class_path
new_cpp_file common_ctx common_ctx.file class_path
6 changes: 1 addition & 5 deletions src/generators/cpp/cppTypeUtils.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
(* Various helper functions to run checks on haxe classes and various other ast types *)
(* functions in here operate on standard haxe ast types, not gencpp ast types *)

open Extlib_leftovers
open Ast
open Type
open Error
open Globals

let follow = Abstract.follow_with_abstracts

Expand Down Expand Up @@ -354,4 +350,4 @@ let class_name class_def =
let nativeGen = Meta.has Meta.NativeGen class_def.cl_meta in
class_path ^ if nativeGen then "" else "_obj"

let class_pointer class_def = "::hx::ObjectPtr< " ^ class_name class_def ^ " >"
let class_pointer class_def = "::hx::ObjectPtr< " ^ class_name class_def ^ " >"
2 changes: 0 additions & 2 deletions src/generators/cpp/gen/cppCppia.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
open Extlib_leftovers
open Ast
open Type
open Error
Expand All @@ -7,7 +6,6 @@ open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
open CppSourceWriter
open CppContext

let cpp_type_of = CppRetyper.cpp_type_of
Expand Down
3 changes: 1 addition & 2 deletions src/generators/cpp/gen/cppGen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
Expand Down Expand Up @@ -2045,4 +2044,4 @@ let dynamic_functions class_def =
when is_dynamic_haxe_method field ->
keyword_remap field.cf_name :: result
| _ -> result)
[] class_def.cl_ordered_fields
[] class_def.cl_ordered_fields
3 changes: 1 addition & 2 deletions src/generators/cpp/gen/cppGenClassHeader.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
Expand Down Expand Up @@ -549,4 +548,4 @@ let generate baseCtx class_def =

end_header_file output_h def_string;

h_file#close
h_file#close
3 changes: 1 addition & 2 deletions src/generators/cpp/gen/cppGenClassImplementation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
Expand Down Expand Up @@ -1389,4 +1388,4 @@ let generate baseCtx class_def =
^ "_delegate alloc] initWithImplementation:inImplementation.mPtr];\n");
output_cpp "}\n\n");

cpp_file#close
cpp_file#close
6 changes: 0 additions & 6 deletions src/generators/cpp/gen/cppGenEnum.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
open Ast
open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
open CppSourceWriter
open CppContext
Expand Down
6 changes: 0 additions & 6 deletions src/generators/cpp/gen/cppReferences.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
open Ast
open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
open CppSourceWriter
open CppContext

(*
Expand Down
4 changes: 1 addition & 3 deletions src/generators/gencpp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ open Type
open Error
open Globals
open CppStrings
open CppExprUtils
open CppTypeUtils
open CppAst
open CppAstTools
open CppSourceWriter
open CppContext
Expand Down Expand Up @@ -399,4 +397,4 @@ let generate common_ctx =
end else begin
let ctx = new_context common_ctx debug_level (ref PMap.empty) (create_member_types common_ctx) in
generate_source ctx
end
end
1 change: 0 additions & 1 deletion src/generators/genswf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ open Error
open Gctx
open Ast
open Globals
open NativeLibraries

let tag ?(ext=false) d = {
tid = 0;
Expand Down
1 change: 0 additions & 1 deletion src/typing/macroContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ open DisplayTypes.DisplayMode
open Common
open Type
open Typecore
open Resolution
open Error
open Globals

Expand Down

0 comments on commit 1f553c5

Please sign in to comment.