mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
StdIo: Init() automatically in Console()
Applications that initialize a `cm::StdIo::Console` immediately no longer need to `cm::StdIo::Init` first.
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "cmState.h"
|
||||
#include "cmStateSnapshot.h"
|
||||
#include "cmStdIoConsole.h"
|
||||
#include "cmStdIoInit.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmValue.h"
|
||||
@@ -90,8 +89,6 @@ std::vector<cmDocumentationEntry> makeGeneratorDocs(
|
||||
// this is CPack.
|
||||
int main(int argc, char const* const* argv)
|
||||
{
|
||||
cm::StdIo::Init();
|
||||
|
||||
cm::StdIo::Console console;
|
||||
|
||||
cmsys::Encoding::CommandLineArguments args =
|
||||
|
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cmStdIoInit.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <memory>
|
||||
#endif
|
||||
@@ -28,7 +30,7 @@ namespace StdIo {
|
||||
*
|
||||
* Destroy the instance of this to restore the original `streambuf`s.
|
||||
*/
|
||||
class Console
|
||||
class Console : private Init
|
||||
{
|
||||
#ifdef _WIN32
|
||||
class Impl;
|
||||
|
@@ -34,7 +34,6 @@
|
||||
#include "cmState.h"
|
||||
#include "cmStateTypes.h"
|
||||
#include "cmStdIoConsole.h"
|
||||
#include "cmStdIoInit.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmValue.h"
|
||||
@@ -1142,8 +1141,6 @@ int do_open(int ac, char const* const* av)
|
||||
|
||||
int main(int ac, char const* const* av)
|
||||
{
|
||||
cm::StdIo::Init();
|
||||
|
||||
cm::optional<cm::StdIo::Console> console = cm::StdIo::Console();
|
||||
|
||||
cmsys::Encoding::CommandLineArguments args =
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#include "cmInstrumentation.h"
|
||||
#include "cmInstrumentationQuery.h"
|
||||
#include "cmStdIoConsole.h"
|
||||
#include "cmStdIoInit.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#include "CTest/cmCTestLaunch.h"
|
||||
@@ -167,8 +166,6 @@ cmDocumentationEntry const cmDocumentationOptions[] = {
|
||||
// this is a test driver program for cmCTest.
|
||||
int main(int argc, char const* const* argv)
|
||||
{
|
||||
cm::StdIo::Init();
|
||||
|
||||
cm::StdIo::Console console;
|
||||
|
||||
cmsys::Encoding::CommandLineArguments encoding_args =
|
||||
|
Reference in New Issue
Block a user