diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-11-27 14:53:07 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-12-01 15:41:45 +0000 |
commit | 712964ef2485a2fc66a791209cb8ab5e3f4ca0d0 (patch) | |
tree | 9ebdeec2cae4770f8317b7e5d5245a79c3a2f655 /examples | |
parent | 276ddf9f87ee513440bbb72473b48b69eb0319a5 (diff) | |
download | qbs-712964ef2485a2fc66a791209cb8ab5e3f4ca0d0.tar.gz |
Add missing std:: namespace for all functions from <cstdio> library
Change-Id: Ia5c14b86e5e0952dbebf103c5355f49e41158cba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/code-generator/hwgen.cpp | 10 | ||||
-rw-r--r-- | examples/helloworld-complex/src/main.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/code-generator/hwgen.cpp b/examples/code-generator/hwgen.cpp index 1e2556648..90f2eadf4 100644 --- a/examples/code-generator/hwgen.cpp +++ b/examples/code-generator/hwgen.cpp @@ -54,12 +54,12 @@ int main(int argc, char **argv) { if (argc < 2) return 1; - FILE *f = fopen(argv[1], "w"); + std::FILE *f = std::fopen(argv[1], "w"); if (!f) return 2; - fprintf(f, "#include <cstdio>\n\n" - "int main()\n" - "{\n printf(\"Hello World!\\n\");\n return 0;\n}\n"); - fclose(f); + std::fprintf(f, "#include <cstdio>\n\n" + "int main()\n" + "{\n std::printf(\"Hello World!\\n\");\n return 0;\n}\n"); + std::fclose(f); return 0; } diff --git a/examples/helloworld-complex/src/main.cpp b/examples/helloworld-complex/src/main.cpp index 8827c1e5e..54e215d13 100644 --- a/examples/helloworld-complex/src/main.cpp +++ b/examples/helloworld-complex/src/main.cpp @@ -68,9 +68,9 @@ int main() { someUsefulFunction(); #if defined(HAS_DEBUG) - puts("Hello World! (debug version)"); + std::puts("Hello World! (debug version)"); #elif defined(HAS_RELEASE) - puts("Hello World! (release version)"); + std::puts("Hello World! (release version)"); #endif #ifdef HAS_SPECIAL_FEATURE bragAboutSpecialFeature(); |