Skip to content

删除了.cpp中的pragma once#15

Open
haytham818 wants to merge 1 commit intomainfrom
fix-pragma-once-in-cpp
Open

删除了.cpp中的pragma once#15
haytham818 wants to merge 1 commit intomainfrom
fix-pragma-once-in-cpp

Conversation

@haytham818
Copy link
Copy Markdown
Collaborator

我也不知道为什么编辑器把\t 换成空格了

Copilot AI review requested due to automatic review settings January 14, 2026 04:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes incorrect usage of #pragma once from C++ implementation files (.cpp). The #pragma once directive is a header guard that should only be used in header files (.h) to prevent multiple inclusion, not in implementation files.

Changes:

  • Removed #pragma once from three .cpp files where it was incorrectly placed
  • Reformatted LinuxPlatformUtils.cpp to use consistent whitespace (spaces instead of tabs)
  • Reordered includes in LinuxPlatformUtils.cpp to maintain consistency

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
Engine/src/Platform/Windows/WindowsPlatformUtils.cpp Removed incorrect #pragma once directive
Engine/src/Himii/Renderer/Renderer2D.cpp Removed incorrect #pragma once directive
Engine/src/Himii/Renderer/Buffer.cpp Removed incorrect #pragma once directive
Engine/src/Platform/Linux/LinuxPlatformUtils.cpp Reformatted with consistent spacing and brace placement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants