Переглянути джерело

src/*: code-style: disable code formatter in problematic chunks

Daniele Bartolini 3 роки тому
батько
коміт
b3f54546e9
2 змінених файлів з 4 додано та 0 видалено
  1. 2 0
      src/lua/lua_api.cpp
  2. 2 0
      src/resource/data_compiler.cpp

+ 2 - 0
src/lua/lua_api.cpp

@@ -463,6 +463,7 @@ static void lua_dump_table(lua_State *L, int i, StringStream &json)
 
 void load_api(LuaEnvironment &env)
 {
+	// code-format off
 	env.add_module_function("Math", "ray_plane_intersection", [](lua_State *L) {
 			LuaStack stack(L);
 			const Plane3 p = plane3::from_point_and_normal(stack.get_vector3(3)
@@ -2861,6 +2862,7 @@ void load_api(LuaEnvironment &env)
 			device()->_window->set_cursor_mode(cm);
 			return 0;
 		});
+	// code-format on
 }
 
 } // namespace crown

+ 2 - 0
src/resource/data_compiler.cpp

@@ -1233,6 +1233,7 @@ int main_data_compiler(const DeviceOptions &opts)
 	sigaction(SIGINT, NULL, &old_SIGINT);
 	sigaction(SIGINT, &act, NULL);
 #elif CROWN_PLATFORM_WINDOWS
+	// code-format off
 	PHANDLER_ROUTINE signal_handler = [](DWORD dwCtrlType) {
 		switch (dwCtrlType) {
 		case CTRL_C_EVENT:
@@ -1243,6 +1244,7 @@ int main_data_compiler(const DeviceOptions &opts)
 			return FALSE;
 		}
 	};
+	// code-format on
 	SetConsoleCtrlHandler(signal_handler, TRUE);
 #endif // CROWN_PLATFORM_POSIX