diff options
author | eb | 2006-08-04 17:02:26 +0000 |
---|---|---|
committer | eb | 2006-08-04 17:02:26 +0000 |
commit | a47b421365b48263ac647083d7fb963b184daae5 (patch) | |
tree | 3d6e9e46c75739b348fdc9bf529d841bc55bbc90 /gr-error-correcting-codes/src/lib/libecc | |
parent | 33998145b1539db5e8299a046eac4334ec9312b7 (diff) | |
download | gnuradio-a47b421365b48263ac647083d7fb963b184daae5.tar.gz gnuradio-a47b421365b48263ac647083d7fb963b184daae5.tar.bz2 gnuradio-a47b421365b48263ac647083d7fb963b184daae5.zip |
Fixed compile problem on x86_64. Reordered functions for consistency.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3144 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-error-correcting-codes/src/lib/libecc')
-rw-r--r-- | gr-error-correcting-codes/src/lib/libecc/mld/n2bs.cc | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/gr-error-correcting-codes/src/lib/libecc/mld/n2bs.cc b/gr-error-correcting-codes/src/lib/libecc/mld/n2bs.cc index 99e95a5d2..e9c25794b 100644 --- a/gr-error-correcting-codes/src/lib/libecc/mld/n2bs.cc +++ b/gr-error-correcting-codes/src/lib/libecc/mld/n2bs.cc @@ -39,16 +39,10 @@ std::string DoIt (int64_t number, size_t digits) return (retVal); } -std::string n2bs (int64_t number, size_t digits) -{ - if (digits > (sizeof (int64_t) * g_num_bits_per_byte)) - digits = sizeof (int64_t); - return DoIt (number, digits); -} -std::string n2bs (int8_t number, size_t digits) +std::string n2bs (u_int8_t number, size_t digits) { - if (digits > (sizeof (int8_t) * g_num_bits_per_byte)) - digits = sizeof (int8_t); + if (digits > (sizeof (u_int8_t) * g_num_bits_per_byte)) + digits = sizeof (u_int8_t); return DoIt ((int64_t) number, digits); } std::string n2bs (int16_t number, size_t digits) @@ -63,16 +57,18 @@ std::string n2bs (int32_t number, size_t digits) digits = sizeof (int32_t); return DoIt ((int64_t) number, digits); } -std::string n2bs (long number, size_t digits) +std::string n2bs (int64_t number, size_t digits) { - if (digits > (sizeof (long) * g_num_bits_per_byte)) - digits = sizeof (long); - return DoIt ((int64_t) number, digits); + if (digits > (sizeof (int64_t) * g_num_bits_per_byte)) + digits = sizeof (int64_t); + return DoIt (number, digits); } -std::string n2bs (u_int8_t number, size_t digits) + + +std::string n2bs (int8_t number, size_t digits) { - if (digits > (sizeof (u_int8_t) * g_num_bits_per_byte)) - digits = sizeof (u_int8_t); + if (digits > (sizeof (int8_t) * g_num_bits_per_byte)) + digits = sizeof (int8_t); return DoIt ((int64_t) number, digits); } std::string n2bs (u_int16_t number, size_t digits) @@ -87,12 +83,6 @@ std::string n2bs (u_int32_t number, size_t digits) digits = sizeof (u_int32_t); return DoIt ((int64_t) number, digits); } -std::string n2bs (unsigned long number, size_t digits) -{ - if (digits > (sizeof (unsigned long) * g_num_bits_per_byte)) - digits = sizeof (unsigned long); - return DoIt ((int64_t) number, digits); -} std::string n2bs (u_int64_t number, size_t digits) { if (digits > (sizeof (u_int64_t) * g_num_bits_per_byte)) |