noise-tool: don't check tty until after options
options may include a help request which we'll want to respond to before checking the output stream.
This commit is contained in:
parent
736fe9a156
commit
ee401e4409
@ -164,13 +164,6 @@ operator<< (std::ostream &os, lerp_t &l)
|
|||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
#if !defined(ENABLE_DEBUGGING) and !defined(PLATFORM_WIN32)
|
|
||||||
if (isatty (fileno (stdout))) {
|
|
||||||
std::cerr << "cowardly refusing to dump binary data to console\n";
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// setup default variables
|
// setup default variables
|
||||||
#ifdef ENABLE_DEBUGGING
|
#ifdef ENABLE_DEBUGGING
|
||||||
util::extent2u res {320, 240};
|
util::extent2u res {320, 240};
|
||||||
@ -215,6 +208,13 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
args.scan (argc, argv);
|
args.scan (argc, argv);
|
||||||
|
|
||||||
|
#if !defined(ENABLE_DEBUGGING) and !defined(PLATFORM_WIN32)
|
||||||
|
if (isatty (fileno (stdout))) {
|
||||||
|
std::cerr << "cowardly refusing to dump binary data to console\n";
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
util::noise::turbulence<
|
util::noise::turbulence<
|
||||||
float,
|
float,
|
||||||
util::noise::fractal::runtime<
|
util::noise::fractal::runtime<
|
||||||
|
Loading…
Reference in New Issue
Block a user