mirror of https://github.com/odrling/Aegisub
Fix the rest of the build errors when not using precompiled headers
Originally committed to SVN as r4530.
This commit is contained in:
parent
61138e9b5d
commit
75bd20a6dd
|
@ -18,14 +18,12 @@
|
|||
/// @brief Character set detection and manipulation utilities.
|
||||
/// @ingroup libaegisub
|
||||
|
||||
|
||||
#include "libaegisub/charset.h"
|
||||
#include "charset_ucd.h"
|
||||
|
||||
namespace agi {
|
||||
namespace charset {
|
||||
|
||||
const std::string Detect(const std::string file) {
|
||||
std::string Detect(const std::string &file) {
|
||||
UCDetect ucd(file);
|
||||
return ucd.Single();
|
||||
}
|
||||
|
|
|
@ -18,23 +18,18 @@
|
|||
/// @brief Character set detection using Universalchardet
|
||||
/// @ingroup libaegisub
|
||||
|
||||
#include "charset_ucd.h"
|
||||
|
||||
#ifndef LAGI_PRE
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "../../universalchardet/nsCharSetProber.h"
|
||||
#endif
|
||||
|
||||
#include "libaegisub/charset.h"
|
||||
#include "charset_ucd.h"
|
||||
#include "libaegisub/io.h"
|
||||
|
||||
namespace agi {
|
||||
namespace charset {
|
||||
|
||||
UCDetect::UCDetect(const std::string file): nsUniversalDetector(NS_FILTER_ALL) {
|
||||
UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL) {
|
||||
{
|
||||
std::ifstream *fp;
|
||||
fp = io::Open(file);
|
||||
|
|
|
@ -18,15 +18,21 @@
|
|||
/// @brief Character set detection using Universalchardet
|
||||
/// @ingroup libaegisub
|
||||
|
||||
#include "libaegisub/charset.h"
|
||||
|
||||
#ifndef LAGI_PRE
|
||||
#include <string>
|
||||
|
||||
#ifndef _WIN32
|
||||
#define _X86_ 1
|
||||
#endif
|
||||
|
||||
#include "../../universalchardet/nscore.h"
|
||||
#include "../../universalchardet/nsUniversalDetector.h"
|
||||
#include "../../universalchardet/nsMBCSGroupProber.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace agi {
|
||||
namespace charset {
|
||||
|
||||
|
@ -45,7 +51,7 @@ public:
|
|||
|
||||
/// @brief Detect character set of a file using UniversalCharDetect
|
||||
/// @param file File to check
|
||||
UCDetect(const std::string file);
|
||||
UCDetect(const std::string &file);
|
||||
|
||||
/// @brief Detect character set of a file using UniversalCharDet
|
||||
/// @param out[out] Map to load list into ordered by confidence
|
||||
|
|
|
@ -19,8 +19,11 @@
|
|||
/// @ingroup libaegisub
|
||||
|
||||
#ifndef LAGI_PRE
|
||||
#endif
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#endif
|
||||
#include <libaegisub/exception.h>
|
||||
|
||||
namespace agi {
|
||||
|
@ -34,13 +37,13 @@ typedef std::map<float, std::string, std::greater_equal<float> > CharsetListDete
|
|||
|
||||
/// @brief Return a complete list of detected character sets ordered by precidence.
|
||||
/// @param file File to check
|
||||
/// @param[in] list Map to load detected list into.
|
||||
/// @param[out] list Map to load detected list into.
|
||||
void DetectAll(const std::string file, CharsetListDetected &list);
|
||||
|
||||
/// @brief Returns the character set with the highest confidence
|
||||
/// @param file File to check
|
||||
/// @return Detected character set.
|
||||
const std::string Detect(const std::string file);
|
||||
std::string Detect(const std::string &file);
|
||||
|
||||
|
||||
} // namespace util
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
/// @ingroup libaegisub
|
||||
|
||||
#ifndef LAGI_PRE
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#endif
|
||||
|
||||
#include <libaegisub/exception.h>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#ifndef LAGI_PRE
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue