Skip to content

Commit

Permalink
Update toFloat.cpp
Browse files Browse the repository at this point in the history
remove a main function
  • Loading branch information
danoli3 authored Jul 29, 2024
1 parent a03ea3d commit f347c2e
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions Source/OpenEXR/Half/toFloat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,34 +131,34 @@ halfToFloat (unsigned short y)
// Main - prints the half-to-float lookup table
//---------------------------------------------

int
main ()
{
cout.precision (9);
cout.setf (ios_base::hex, ios_base::basefield);
// int
// main ()
// {
// cout.precision (9);
// cout.setf (ios_base::hex, ios_base::basefield);

cout << "//\n"
"// This is an automatically generated file.\n"
"// Do not edit.\n"
"//\n\n";
// cout << "//\n"
// "// This is an automatically generated file.\n"
// "// Do not edit.\n"
// "//\n\n";

cout << "{\n ";
// cout << "{\n ";

const int iMax = (1 << 16);
// const int iMax = (1 << 16);

for (int i = 0; i < iMax; i++)
{
cout << "{0x" << setfill ('0') << setw (8) << halfToFloat (i) << "}, ";
// for (int i = 0; i < iMax; i++)
// {
// cout << "{0x" << setfill ('0') << setw (8) << halfToFloat (i) << "}, ";

if (i % 4 == 3)
{
cout << "\n";
// if (i % 4 == 3)
// {
// cout << "\n";

if (i < iMax - 1)
cout << " ";
}
}
// if (i < iMax - 1)
// cout << " ";
// }
// }

cout << "};\n";
return 0;
}
// cout << "};\n";
// return 0;
// }

0 comments on commit f347c2e

Please sign in to comment.