Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

New facility: static_data, with hex digits 0 - f!

  • Loading branch information...
commit d4f66a77126efa54de8bc3deb20600468935228a 1 parent 5e41cdb
@marshray authored
View
2  src/include/qak/prng64.hxx
@@ -56,7 +56,7 @@ namespace qak { //==============================================================
seed_T seed,
typename std::enable_if<
std::is_integral<seed_T>::value,
- void>::type * dummy = 0
+ void>::type * = 0
) :
z_(tweak_integral_seed_)
{
View
46 src/include/qak/static_data.hxx
@@ -0,0 +1,46 @@
+// vim: set ts=4 sw=4 tw=120:
+//=====================================================================================================================|
+//
+// Copyright (c) 2012, Marsh Ray
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+// OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+//
+//=====================================================================================================================|
+//
+//#include "qak/static_data.hxx"
+
+#ifndef qak_static_data_hxx_INCLUDED_
+#define qak_static_data_hxx_INCLUDED_
+
+namespace qak { //=====================================================================================================|
+
+ static unsigned const cnt_decdigits = 10;
+
+ extern char const decdigits[cnt_decdigits];
+
+ //=================================================================================================================|
+
+ static unsigned const cnt_hexdigits = 16;
+
+ extern char const hexdigits[cnt_hexdigits];
+
+ //=================================================================================================================|
+
+ //-----------------------------------------------------------------------------------------------------------------|
+
+ //=================================================================================================================|
+
+ //-----------------------------------------------------------------------------------------------------------------|
+
+} // namespace qak ====================================================================================================|
+#endif // ndef qak_static_data_hxx_INCLUDED_
View
1  src/libqak/CMakeLists.txt
@@ -27,6 +27,7 @@ add_library( qak STATIC
rptr.cxx
rotate_sequence.cxx
stopwatch.cxx
+ static_data.cxx
thread.cxx
thread_group.cxx
ucs.cxx
View
44 src/libqak/static_data.cxx
@@ -0,0 +1,44 @@
+// vim: set ts=4 sw=4 tw=120:
+//=====================================================================================================================|
+//
+// Copyright (c) 2012, Marsh Ray
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+// OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+//
+//=====================================================================================================================|
+//
+// static_data.cxx
+
+#include "qak/static_data.hxx"
+
+namespace qak { //=====================================================================================================|
+
+ char const decdigits[cnt_decdigits] =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'
+ };
+
+ char const hexdigits[cnt_hexdigits] =
+ {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
+ };
+
+ //=================================================================================================================|
+
+ //-----------------------------------------------------------------------------------------------------------------|
+
+ //=================================================================================================================|
+
+ //-----------------------------------------------------------------------------------------------------------------|
+
+} // namespace qak ====================================================================================================|
Please sign in to comment.
Something went wrong with that request. Please try again.