diff options
| author | ruki <[email protected]> | 2025-11-10 06:35:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-10 06:35:04 +0800 |
| commit | 2b01e46fcf619aaecb8435b0fac975e3aff0587f (patch) | |
| tree | 8f005a8dfc3272e9f027560e5e1b5881a7a8bc70 /tests/projects/c++/modules/namespace/src | |
| parent | a1b0ec856e2c22aac84022feb05b6687912e3d6e (diff) | |
| parent | 2c387895657ae13cd717d7f42f5baed5eb028a8e (diff) | |
Merge pull request #7008 from xmake-io/format
format code
Diffstat (limited to 'tests/projects/c++/modules/namespace/src')
| -rw-r--r-- | tests/projects/c++/modules/namespace/src/hello_impl.cpp | 21 | ||||
| -rw-r--r-- | tests/projects/c++/modules/namespace/src/main.cpp | 1 | ||||
| -rw-r--r-- | tests/projects/c++/modules/namespace/src/mod_impl.cpp | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/projects/c++/modules/namespace/src/hello_impl.cpp b/tests/projects/c++/modules/namespace/src/hello_impl.cpp index 064afebad..b7f9baaa3 100644 --- a/tests/projects/c++/modules/namespace/src/hello_impl.cpp +++ b/tests/projects/c++/modules/namespace/src/hello_impl.cpp @@ -5,19 +5,20 @@ module hello; import mod; void inner() { - std::cout << "hello world! data: " - << mod::foo() << std::endl; + std::cout << "hello world! data: " << mod::foo() << std::endl; } namespace hello { - int data__; - void say_hello() { ::inner(); } +int data__; +void say_hello() { + ::inner(); +} - say::say(int data) : data_{data} { - } +say::say(int data) : data_{ data } { +} - void say::hello() { - hello::data__ = data_; - ::inner(); - } +void say::hello() { + hello::data__ = data_; + ::inner(); } +} // namespace hello diff --git a/tests/projects/c++/modules/namespace/src/main.cpp b/tests/projects/c++/modules/namespace/src/main.cpp index 93cc427a4..470c69ebc 100644 --- a/tests/projects/c++/modules/namespace/src/main.cpp +++ b/tests/projects/c++/modules/namespace/src/main.cpp @@ -6,4 +6,3 @@ int main() { hello::say(sizeof(hello::say)).hello(); return 0; } - diff --git a/tests/projects/c++/modules/namespace/src/mod_impl.cpp b/tests/projects/c++/modules/namespace/src/mod_impl.cpp index 1adf6570e..aabac7648 100644 --- a/tests/projects/c++/modules/namespace/src/mod_impl.cpp +++ b/tests/projects/c++/modules/namespace/src/mod_impl.cpp @@ -2,7 +2,7 @@ module mod; import hello; namespace mod { - int foo() { - return hello::data__; - } +int foo() { + return hello::data__; } +} // namespace mod |
