Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Pull in C++ style headers from Jeroen Vermeulen
Browse files Browse the repository at this point in the history
From Moses b3c0a29044dd873427a5aa6d38a8eafdd198a2b4 88e90957a1b56c98842769947f07d7abee95a8ec
  • Loading branch information
kpu committed Apr 2, 2015
1 parent 0214241 commit d7db0ed
Show file tree
Hide file tree
Showing 67 changed files with 87 additions and 119 deletions.
3 changes: 1 addition & 2 deletions lm/bhiksha.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
#include "util/sorted_uniform.hh"

#include <algorithm>

#include <stdint.h>
#include <assert.h>
#include <cassert>

namespace lm {
namespace ngram {
Expand Down
3 changes: 1 addition & 2 deletions lm/blank.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
#define LM_BLANK_H

#include <limits>

#include <stdint.h>
#include <math.h>
#include <cmath>

namespace lm {
namespace ngram {
Expand Down
5 changes: 2 additions & 3 deletions lm/build_binary_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
#include <iostream>
#include <iomanip>
#include <limits>

#include <math.h>
#include <stdlib.h>
#include <cmath>
#include <cstdlib>

#ifdef WIN32
#include "util/getopt.hh"
Expand Down
4 changes: 2 additions & 2 deletions lm/builder/interpolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "util/fixed_array.hh"
#include "util/murmur_hash.hh"

#include <assert.h>
#include <math.h>
#include <cassert>
#include <cmath>

namespace lm { namespace builder {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion lm/builder/joint_order.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <iostream>
#endif

#include <string.h>
#include <cstring>

namespace lm { namespace builder {

Expand Down
5 changes: 2 additions & 3 deletions lm/builder/ngram.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
#include "lm/word_index.hh"

#include <cstddef>

#include <assert.h>
#include <cassert>
#include <stdint.h>
#include <string.h>
#include <cstring>

namespace lm {
namespace builder {
Expand Down
3 changes: 1 addition & 2 deletions lm/builder/print.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
#include "util/stream/timer.hh"

#include <sstream>

#include <string.h>
#include <cstring>

namespace lm { namespace builder {

Expand Down
3 changes: 1 addition & 2 deletions lm/builder/print.hh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
#include "util/string_piece.hh"

#include <ostream>

#include <assert.h>
#include <cassert>

// Warning: print routines read all unigrams before all bigrams before all
// trigrams etc. So if other parts of the chain move jointly, you'll have to
Expand Down
6 changes: 3 additions & 3 deletions lm/filter/arpa_io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <string>
#include <vector>

#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <cctype>
#include <cerrno>
#include <cstring>

namespace lm {

Expand Down
2 changes: 1 addition & 1 deletion lm/filter/arpa_io.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <string>
#include <vector>

#include <string.h>
#include <cstring>
#include <stdint.h>

namespace util { class FilePiece; }
Expand Down
2 changes: 1 addition & 1 deletion lm/filter/phrase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <string>
#include <vector>

#include <ctype.h>
#include <cctype>

namespace lm {
namespace phrase {
Expand Down
2 changes: 1 addition & 1 deletion lm/filter/vocab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <istream>
#include <iostream>

#include <ctype.h>
#include <cctype>

namespace lm {
namespace vocab {
Expand Down
4 changes: 2 additions & 2 deletions lm/lm_exception.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lm/lm_exception.hh"

#include<errno.h>
#include<stdio.h>
#include <cerrno>
#include <cstdio>

namespace lm {

Expand Down
3 changes: 1 addition & 2 deletions lm/model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#include <algorithm>
#include <vector>

#include <string.h>
#include <cstring>

namespace util { class FilePiece; }

Expand Down
4 changes: 2 additions & 2 deletions lm/model_test.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "lm/model.hh"

#include <stdlib.h>
#include <string.h>
#include <cstdlib>
#include <cstring>

#define BOOST_TEST_MODULE ModelTest
#include <boost/test/unit_test.hpp>
Expand Down
3 changes: 1 addition & 2 deletions lm/ngram_query.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#include <ostream>
#include <istream>
#include <string>

#include <math.h>
#include <cmath>

namespace lm {
namespace ngram {
Expand Down
3 changes: 1 addition & 2 deletions lm/partial.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "lm/state.hh"

#include <algorithm>

#include <assert.h>
#include <cassert>

namespace lm {
namespace ngram {
Expand Down
4 changes: 2 additions & 2 deletions lm/read_arpa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <sstream>
#include <vector>

#include <ctype.h>
#include <string.h>
#include <cctype>
#include <cstring>
#include <stdint.h>

#ifdef WIN32
Expand Down
3 changes: 1 addition & 2 deletions lm/search_trie.hh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

#include <vector>
#include <cstdlib>

#include <assert.h>
#include <cassert>

namespace lm {
namespace ngram {
Expand Down
2 changes: 1 addition & 1 deletion lm/state.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "lm/word_index.hh"
#include "util/murmur_hash.hh"

#include <string.h>
#include <cstring>

namespace lm {
namespace ngram {
Expand Down
2 changes: 1 addition & 1 deletion lm/trie.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "util/exception.hh"
#include "util/sorted_uniform.hh"

#include <assert.h>
#include <cassert>

namespace lm {
namespace ngram {
Expand Down
2 changes: 1 addition & 1 deletion lm/virtual_interface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "util/string_piece.hh"

#include <string>
#include <string.h>
#include <cstring>

namespace lm {
namespace base {
Expand Down
3 changes: 1 addition & 2 deletions lm/vocab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include "util/probing_hash_table.hh"

#include <string>

#include <string.h>
#include <cstring>

namespace lm {
namespace ngram {
Expand Down
2 changes: 1 addition & 1 deletion lm/word_index.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef LM_WORD_INDEX_H
#define LM_WORD_INDEX_H

#include <limits.h>
#include <climits>

namespace lm {
typedef unsigned int WordIndex;
Expand Down
3 changes: 1 addition & 2 deletions lm/wrappers/nplm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#include "util/file.hh"

#include <algorithm>

#include <string.h>
#include <cstring>

#include "neuralLM.h"

Expand Down
2 changes: 1 addition & 1 deletion util/bit_packing.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "util/bit_packing.hh"
#include "util/exception.hh"

#include <string.h>
#include <cstring>

namespace util {

Expand Down
5 changes: 2 additions & 3 deletions util/bit_packing.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* NICT.
*/

#include <assert.h>
#include <cassert>
#ifdef __APPLE__
#include <architecture/byte_order.h>
#elif __linux__
Expand All @@ -28,8 +28,7 @@
#endif

#include <stdint.h>

#include <string.h>
#include <cstring>

namespace util {

Expand Down
2 changes: 1 addition & 1 deletion util/bit_packing_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define BOOST_TEST_MODULE BitPackingTest
#include <boost/test/unit_test.hpp>

#include <string.h>
#include <cstring>

namespace util {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion util/cat_compressed_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "util/file.hh"
#include "util/read_compressed.hh"

#include <string.h>
#include <cstring>
#include <iostream>

namespace {
Expand Down
2 changes: 1 addition & 1 deletion util/double-conversion/bignum-dtoa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <math.h>
#include <cmath>

#include "bignum-dtoa.h"

Expand Down
6 changes: 3 additions & 3 deletions util/double-conversion/cached-powers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <stdarg.h>
#include <limits.h>
#include <math.h>
#include <cstdarg>
#include <climits>
#include <cmath>

#include "utils.h"

Expand Down
4 changes: 2 additions & 2 deletions util/double-conversion/double-conversion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <limits.h>
#include <math.h>
#include <climits>
#include <cmath>

#include "double-conversion.h"

Expand Down
2 changes: 1 addition & 1 deletion util/double-conversion/fixed-dtoa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <math.h>
#include <cmath>

#include "fixed-dtoa.h"
#include "ieee.h"
Expand Down
4 changes: 2 additions & 2 deletions util/double-conversion/strtod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <stdarg.h>
#include <limits.h>
#include <cstdarg>
#include <climits>

#include "strtod.h"
#include "bignum.h"
Expand Down
1 change: 0 additions & 1 deletion util/ersatz_progress.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <iostream>
#include <string>

#include <stdint.h>

// Ersatz version of boost::progress so core language model doesn't depend on
Expand Down
4 changes: 2 additions & 2 deletions util/exception.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <typeinfo>
#endif

#include <errno.h>
#include <string.h>
#include <cerrno>
#include <cstring>

namespace util {

Expand Down
1 change: 0 additions & 1 deletion util/exception.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <limits>
#include <sstream>
#include <string>

#include <stdint.h>

namespace util {
Expand Down
6 changes: 3 additions & 3 deletions util/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include <sstream>


#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <cassert>
#include <cerrno>
#include <climits>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
Expand Down
Loading

0 comments on commit d7db0ed

Please sign in to comment.